hi!
i want to draw "double-values",for example want to draw a point at 3.55 in x direction and 3.67 in y direction, but with SetPixel my point would be set
at 3,3 because SetPixel use long values.
SetPixel will always render on integer pixel boundaries. If you wanted to work with floating point values you would need to multiply each coordinate by a fixed factor then cast the result. For example:
x = 3.55
y = 3.67
_x = (DWORD)(x * 100);
_y = (DWORD)(y * 100);
This would now make x = 355 and y = 367. You would then need to somehow scale these values to fit the display size of the device, or simply not draw any values outside of the display size (eg they are considered offscreen points).
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum