This site is no longer active and is available for archival purposes only. Registration and login is disabled.

render pixel


render pixel

Postby Guest » Sep 19, 2003 @ 9:59am

Guest
 


render pixel

Postby nicholsr » Sep 19, 2003 @ 4:56pm

User avatar
nicholsr
pm Member
 
Posts: 47
Joined: Sep 8, 2003 @ 10:46pm
Location: Brighton, CO


Postby Guest » Sep 25, 2003 @ 10:36am

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
Guest
 


Postby Pejo Software - Per » Sep 25, 2003 @ 11:52am

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?
User avatar
Pejo Software - Per
pm Insider
 
Posts: 343
Joined: Apr 25, 2002 @ 1:00pm
Location: Mölndal, Sweden


Postby ppcStudios » Sep 25, 2003 @ 11:54am

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.
G.R. Moore
President/CEO
Pocket PC Studios
www.ppcstudios.com

Image
User avatar
ppcStudios
pm Insider
 
Posts: 744
Joined: Aug 23, 2002 @ 3:53pm
Location: Canfield, Ohio


Postby mlepage » Sep 25, 2003 @ 4:13pm

www.scalenesoftware.com
Great games for your Palm and Pocket PC!
User avatar
mlepage
pm Insider
 
Posts: 1050
Joined: Aug 3, 2003 @ 4:47am
Location: Canada


Postby mlepage » Sep 25, 2003 @ 4:15pm

www.scalenesoftware.com
Great games for your Palm and Pocket PC!
User avatar
mlepage
pm Insider
 
Posts: 1050
Joined: Aug 3, 2003 @ 4:47am
Location: Canada


Postby Pam » Sep 25, 2003 @ 4:47pm

And if you want to make it appear less discrete, check out Wu Particles at

Pam
All the easy problems have been solved.
User avatar
Pam
pm Insider
 
Posts: 449
Joined: Jan 24, 2002 @ 10:30pm
Location: Ohio


Postby mlepage » Sep 25, 2003 @ 5:01pm

www.scalenesoftware.com
Great games for your Palm and Pocket PC!
User avatar
mlepage
pm Insider
 
Posts: 1050
Joined: Aug 3, 2003 @ 4:47am
Location: Canada


Postby Pejo Software - Per » Sep 25, 2003 @ 9:04pm

User avatar
Pejo Software - Per
pm Insider
 
Posts: 343
Joined: Apr 25, 2002 @ 1:00pm
Location: Mölndal, Sweden


Postby mlepage » Sep 25, 2003 @ 9:58pm

www.scalenesoftware.com
Great games for your Palm and Pocket PC!
User avatar
mlepage
pm Insider
 
Posts: 1050
Joined: Aug 3, 2003 @ 4:47am
Location: Canada


Postby Pejo Software - Per » Sep 25, 2003 @ 10:11pm

User avatar
Pejo Software - Per
pm Insider
 
Posts: 343
Joined: Apr 25, 2002 @ 1:00pm
Location: Mölndal, Sweden


Return to GapiDraw


Sort


Forum Description

The Cross-platform Graphics SDK for Palms, Pocket PCs, Symbian Devices, and Stationary PCs.

Moderators:

sponge, Johan

Forum permissions

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