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

RGBA surfaces and GetBuffer


RGBA surfaces and GetBuffer

Postby efortier » Oct 14, 2003 @ 8:36am

User avatar
efortier
pm Insider
 
Posts: 373
Joined: May 15, 2002 @ 10:32pm


Postby Johan » Oct 14, 2003 @ 9:58am

Johan Sanneblad, M.Sc, Ph.D
GapiDraw Systems Architect
[]
User avatar
Johan
pm Member
 
Posts: 1843
Joined: Jan 12, 2002 @ 12:38pm
Location: Sweden


Postby efortier » Oct 14, 2003 @ 7:43pm

Thanks!

So I just need to do this to retrieve the color:

DWORD *Buffer = (DWORD *) BufferDesc.pBuffer;

then add the proper pitches to Buffer and retrieve the color like this:

COLORREF Color = Buffer[whatever] & 0x00ffffff;

--Eric
User avatar
efortier
pm Insider
 
Posts: 373
Joined: May 15, 2002 @ 10:32pm


Postby efortier » Oct 14, 2003 @ 7:47pm

Update: I must use xPitch >> 2 to get the number of DWORD to add for each x increment, right?

--Eric
User avatar
efortier
pm Insider
 
Posts: 373
Joined: May 15, 2002 @ 10:32pm


Postby Johan » Oct 15, 2003 @ 9:19am

Johan Sanneblad, M.Sc, Ph.D
GapiDraw Systems Architect
[]
User avatar
Johan
pm Member
 
Posts: 1843
Joined: Jan 12, 2002 @ 12:38pm
Location: 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