
Posted:
Feb 13, 2006 @ 9:45am
by no pockets
Also, I have useful function in my GapiDraw projects which sets transparent color automatically, like the following code for PF. But this doesn't work. I guess I need to convert color data somehow, could smbdy tell me how?
void pickTransparent(Surface* s, int x, int y) {
Rasterizer r(s);
Pixel p = r.GetPixel(x, y);
s->SetColorMask(p);
}
Thank you.

Posted:
Feb 14, 2006 @ 8:59am
by jaguard
3 would be something like:
display->SetRenderTarget(surface);
colormask = display->Getpixel(0,0);
display->SetRenderTarget(NULL);
surface->SetColorMask(colormask);
1 is mentioned a lot here, and implemented by fast_rx, and IIRC included into bigben patch
http://www.pocketmatrix.com/forums/view ... hp?t=21765.