M
Minerva Jones
I've got a UserControl derived control which uses e.Graphics.Drawline
to draw a few lines in OnPaint. I've noticed that the lines, whether
horizontal or vertical are always one pixel longer on the device or
the emulator, to how they appear in Visual Studio at design time. By
my maths, VS is getting it right, the device is actually one pixel
more.
So if I have:
e.Graphics.DrawLine(p, 0, 0, 0, 10);
In Visual Studio the line will be 10 pixels high. In both the emulator
and on a device, it will be 11 pixels high (and thus finish a pixel
lower).
Is there some scaling factor I'm not taking into account? The DpiX and
DpiY are 96 in all cases.
to draw a few lines in OnPaint. I've noticed that the lines, whether
horizontal or vertical are always one pixel longer on the device or
the emulator, to how they appear in Visual Studio at design time. By
my maths, VS is getting it right, the device is actually one pixel
more.
So if I have:
e.Graphics.DrawLine(p, 0, 0, 0, 10);
In Visual Studio the line will be 10 pixels high. In both the emulator
and on a device, it will be 11 pixels high (and thus finish a pixel
lower).
Is there some scaling factor I'm not taking into account? The DpiX and
DpiY are 96 in all cases.