[haiku-development] Re: HiDPI strategies, current and future

  • From: "X512" <dmarc-noreply@xxxxxxxxxxxxx> ("danger_mail")
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 1 Sep 2021 02:28:14 +0900

On 2021/09/01 1:36, Mr. waddlesplash wrote:

This sounds like a good idea on paper, and is the approach adopted by
Qt and a bunch of other toolkits; but in practice, it is a nightmare
to really work with. For one, snapping to the pixel grid is now
extremely difficult (or, worse, the toolkit does not even support
fractional scales at all and demands integer scaling!)
Not really a hightmare. Floating point coordinates can be easily calculated to be pixel-aligned. Some helper functions may be introduced. If you know scale ratio, you can snap coordinates to pixels by using that ratio (xDst = round(xSrc / scaleRatio) * scaleRatio).

Other related posts: