Skip to main content
Chandan Bhatia1
Associate III
November 26, 2020
Question

Modify alpha value of specific pixels of customized widget

  • November 26, 2020
  • 5 replies
  • 2270 views

Hello, I am using customized widget in my project. I get buffer index using below:

*framebuffer = touchgfx::HAL::getInstance()->lockFrameBuffer();

0693W000005ChaGQAS.png 

In this  customized widget, I want to set few pixels alpha value as 0 so it can be transparent and back ground can be visible.

Any suggestions?

Thanks

This topic has been closed for replies.

5 replies

Martin KJELDSEN
Principal III
November 26, 2020

You could turn this into a generic widget that you can place on top of things and configure to do something with the pixels below: 1x1 or 10x10, set alpha value, blend with other color, etc.

/Martin

Chandan Bhatia1
Associate III
November 26, 2020

@Martin KJELDSEN​  Sorry I didn't get it. How should I set alpha value ? I am setting value of pixel as below image for custom widget.

0693W000005Cm0XQAS.png 

0693W000005Cm0mQAC.png 

Thanks

Martin KJELDSEN
Principal III
November 26, 2020

I think you should read some general material on how to modify pixels, like blending and applying alpha values. You're doing it in the right place, TouchGFX wise.

/Martin