1. Sprite Masking
Does anyone know how sprites using masks work?
Also how can I use Euphoria to draw them?
I am looking for alternatives to the simple:
if pixel_color = clear_color then
--Don't draw it
else
--Draw it
end if
This is slow because it requires that you cycle through
and examine each pixel in the image.
2. Re: Sprite Masking
If you're using Win32Lib, you could use transBlt like this:
setTransparentColor({255, 0, 255}) -- bright pink is transparent color
transBlt(destination, x, y, bitmap)
Or you could use Win32Dib with its very fast drawDibToDib-routine, which
supports both a transparent color and translucency.
--
tommy online: http://users.pandora.be/tommycarlier