PocketMatrix forums

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

Blitting an RGBA surface on top of another

Hi! I've made some modifications to my code and I need to blit an RGBA surface on top of another (similar to the BltFast method from E2DSurface). I've been browsing through the available methods and none of them seem to achieve what I'm looking for. I though that I might be able to:

A) Made a for loop and use the GetPixel and PutPixel methods on the source and destination surfaces', respectively (slow!).
B) Lock both surfaces and copy the buffers. I'd have to make a for loop, though, since the surfaces have a pitch and I have to take that into account.

I'm sure I'm missing something. Is there any other alternative for blitting an RGBA surface on top of another?

Thanks in advance for your reply,

--Nacho
Hi Nacho,

The best solution is to use surface locking to increase performance. There is no support in EDGELIB for blitting RGBA surfaces on top of another.
Hi edge,

Many thanks for your prompt reply. I'll try it during the weekend and come back here if I encounter any issue.

Cheers,

--Nacho