3
\$\begingroup\$

Is there a way to clear a libGDX Pixmap? Or is the only way to dispose it and create a brand new Pixmap?

\$\endgroup\$

1 Answer 1

3
\$\begingroup\$

If by clear you mean set all the pixels to transparent you could do the bellow.

Pixmap.setColor(Color.CLEAR);
Pixmap.fill()

http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/Pixmap.html#fill-- http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/Color.html

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .