Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an API to render images with transparency #5232

Open
nibirubingus opened this issue Jan 31, 2025 · 1 comment
Open

Add an API to render images with transparency #5232

nibirubingus opened this issue Jan 31, 2025 · 1 comment

Comments

@nibirubingus
Copy link
Contributor

Currently, the textures module and widgets.makeButtonLabelText only allow for non-transparent assets to be rendered. If there are any transparent pixels in the sprite, they will be shown as black instead. That works good enough for most UI applications, but if we were to make a tool that draws custom graphics onto vanilla widgets, for example creature portraits or work detail icons, it would need to handle transparency in order to work.

@myk002
Copy link
Member

myk002 commented Feb 1, 2025

Note that transparency is a function of what layer the texture is rendered to. I don't think it is related to the textures module itself.

Anything drawn to the interface layer will not support transparency.

Anything drawn to the anchor or map layers will.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants