Page 1 of 1

render pixel

PostPosted: Sep 19, 2003 @ 9:59am
by Guest

render pixel

PostPosted: Sep 19, 2003 @ 4:56pm
by nicholsr

PostPosted: Sep 25, 2003 @ 10:36am
by Guest
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.

thanks

PostPosted: Sep 25, 2003 @ 11:52am
by Pejo Software - Per
This really doesn't make any sense to me!
Isn't pixels by nature integer values? On a Pocket PC there are 240x320 pixels!

Are you trying to do some kind of antialiasing?

PostPosted: Sep 25, 2003 @ 11:54am
by ppcStudios
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).

Hope this is what you were looking for.

PostPosted: Sep 25, 2003 @ 4:13pm
by mlepage

PostPosted: Sep 25, 2003 @ 4:15pm
by mlepage

PostPosted: Sep 25, 2003 @ 4:47pm
by Pam
And if you want to make it appear less discrete, check out Wu Particles at

Pam

PostPosted: Sep 25, 2003 @ 5:01pm
by mlepage

PostPosted: Sep 25, 2003 @ 9:04pm
by Pejo Software - Per

PostPosted: Sep 25, 2003 @ 9:58pm
by mlepage

PostPosted: Sep 25, 2003 @ 10:11pm
by Pejo Software - Per