[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[pygame] Transparent text + scrollback



I am attempting to create a transparent text widget with a scrollback
buffer. Rather than keep the rendered surface corresponding to each
individual line, I'd like to stitch them all together into a single
surface for the entire scrollback buffer so that I can blit sections of
that onto the screen at any time. However, I'd also like alpha blending
to work.

I created a surface with an alpha channel to use as the buffer and
filled it with (0, 0, 0, 0). If I blit a piece of text with a
transparent background onto this surface, alpha isn't copied, which
makes sense.

What I'd like is a way to blit *everything*, including the alpha
channel, onto a surface, ignoring the surface's old alpha. Is there a
way to do this?

PGP signature