JvD Posted August 14, 2017 Report Posted August 14, 2017 Does uGFX support RGBA? So Red Green Blue and an Alpha (transparent) value? I would like to draw multiple widgets with a alpha value over each other.
inmarket Posted August 14, 2017 Report Posted August 14, 2017 RGBA is not currently officially supported but is actually very easy to do for displays that support it. Just set the uGFX pixel format to RGB888 and define your own macro to define colors with alpha. This works because uGFX uses 32bits for a RGB888 color and doesn't mask the top bits when passing it to the driver. What is not supported is color mixing using the alpha values by uGFX itself. The alpha values can only be directly used in the driver.
Joel Bodenmann Posted August 15, 2017 Report Posted August 15, 2017 Another solution was presented by our community member @Steffan some time ago. He extended the implementation of the pixmap to support color keying by exploiting exactly what @inmarket mentioned. This way the blending happens inside the µGFX pixmap implementation and not the driver.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now