Jump to content
JvD

RGBA support?

Recommended Posts

JvD   

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.

 

 

Share this post


Link to post
Share on other sites
inmarket   

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.

Share this post


Link to post
Share on other sites

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.

 

 

Share this post


Link to post
Share on other sites
Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoticons maximum are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×