Op 9-12-2016 om 12:41 schreef Ondrej Pokorny via Lazarus:

When you introduce DPI of a screen and scaling you lost the pixel perfect drawing too. :(

No :)

Example: scaling from 96 to 120 dpi = x 1.25
So 7 px * 1.25 = 8.75 = 9
    21 px * 1.25 = 26.25 = 26
    22 px * 1.25 = 27.5 = 28
How to get pixel 27?

Easily - use pixel value 27 after scaling.

Ondrej

I'm sorry, don't getting it. You design on a 96 dpi screen. So you have pixel 20, 21, 22 etc. There is no such thing as pixel 21.5. When you scale you always get rounding errors.

Am I missing something?

Luckily, when everyone has a 4k (or more) screen, nobody can see that you one pixel of. So the non pixel perfect will be a non issue in the upcoming future. :)

Erwin


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to