On Mon Mar 4 14:12:00 2024 +0000, Huw Davies wrote:
So now `INTERNAL_XDSTOWS()` and `width_to_LP()` are the same. If this is really what we want we should unify them before changing the implementation. Also, `hypot()` may be useful here. Hi Huw,
thanks for the review.
/* scale width and height but don't mirror them */
static inline INT width_to_LP( DC *dc, INT width ) { - return GDI_ROUND( (double)width * fabs( dc->xformVport2World.eM11 )); + return INTERNAL_XDSTOWS( dc, width ); }
static inline INT height_to_LP( DC *dc, INT height ) { - return GDI_ROUND( (double)height * fabs( dc->xformVport2World.eM22 )); + return INTERNAL_YDSTOWS( dc, height ); +} +
So now `INTERNAL_XDSTOWS()` and `width_to_LP()` are the same. If this is really what we want we should unify them before changing the implementation.
Do you mean by unifying adding a patch that replaces width_to_LP() by INTERNAL_XDSTOWS() and height_to_LP() by INTERNAL_YDSTOWS()? If yes, then with current implementation this leads to test failures.
Also, `hypot()` may be useful here.
Thanks. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5068#note_63679