PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

ecolor_black is the ultimate colorkey?

hi there,

I've been away too long, and suddenly edge already hit version 3.50. anyway, i tried blitting a picture with transparency but why does edge always use ecolor_black or rgb(0,0,0) as the transparent part?

i tried using ecolor_fuchsia but it still recognize black as the transparent part. is it because of my picture or is it something wrong with edge?

hope to hear from you soon. thanks.
Hi Nic-Gun,

Are you setting the colorkey to the source image? When you call GetColorKey() on your image, which value does it return?
hi there,

my code is something like this :

Code:
display->buffer.BltFast(0, 0, &shared-;>common.help, NULL, EFX_COLORKEY);

COLORREF x = shared->common.help.GetColorKey();


and the result of x is 0. it's a black right?

i'm trying to blit this image :

http://www.disitu.com/titipan/help.png

and the it came out like this :

http://disitu.com/titipan/result.jpg

any idea about that? btw, i can't seem to be able to post pictures here?
Hi Nic-Gun,

Your image seems to be using an opacity layer for smooth blending. I recommend loading the PNG as an RGBA surface to show the help text.

If you still want to use a regular RGB surface with a different colorkey, don't forget to call SetColorKey(color) on the source surface first.
okay, i changed the E2DSurface to E2DSurfaceRGBA and it works like wonder. but what if I need to apply rotation and scaling to the image? It seems I can't use Blt to blit this E2DSurfaceRGBA.
Hi Nic-Gun,

If you want to use real-time rotation and scaling, you can only use (colorkeyed) RGB surfaces.

It's possible to resize an RGBA surface (with resampling), but it is recommended to only do this once when loading your images.
ok then. thanks for the info.