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

CGapiSurface used as a mask Question


CGapiSurface used as a mask Question

Postby me2 » Jan 15, 2003 @ 6:15pm

CGapiSurface* mask = new CGapiSurface();
mask->CreateSurface(NULL,width,height);

mask->FillSurface
(NULL,RGB(0,alpha,0),NULL,NULL);


MyQuestion:
How much memory will be allocated for the mask?
size of (RGB)*width*height or
sizeof(G)*widht*height?
(the R and B component are 0)

Note that keeping memory only the G component of the surface is enough ...
[/code]
m_kolevATprosystDOTbg
me2
pm Member
 
Posts: 4
Joined: Nov 7, 2002 @ 12:01pm
Location: Bulgaria


Postby Hosed » Jan 15, 2003 @ 11:56pm

L. L. Goodwin<BR>Purveyor of Code<BR><A href="http://www.planettribes.com/hosed/">Hosed's House of Code</A>
User avatar
Hosed
pm Member
 
Posts: 249
Joined: Jan 3, 2002 @ 2:51am
Location: Montana, USA


Postby me2 » Jan 17, 2003 @ 9:50am

m_kolevATprosystDOTbg
me2
pm Member
 
Posts: 4
Joined: Nov 7, 2002 @ 12:01pm
Location: Bulgaria


Postby Johan » Jan 18, 2003 @ 12:12am

Basically it could.. But all mask operations would have to be modified. It also would mean very little performance gain.
User avatar
Johan
pm Member
 
Posts: 1843
Joined: Jan 12, 2002 @ 12:38pm
Location: Sweden


Postby me2 » Jan 20, 2003 @ 9:59am

So, shall we see it in the next version of GapiDraw?

I think that is worth to implement ...
or maybe implement a new CGapiMaskSurface class that would be memory optimized and some drawing methods using it ...
I prefer the first option
Of course, as you said, there would be other thing that would need touch ...
m_kolevATprosystDOTbg
me2
pm Member
 
Posts: 4
Joined: Nov 7, 2002 @ 12:01pm
Location: Bulgaria


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