cancel
Showing results for 
Search instead for 
Did you mean: 

How to work with pixels?

EEuge
Senior

Hello!

I put to project a widget box1, it's color is white.

I want to set color of each pixel of box

like this: SetPixel(x,y, R,G,B);

And after I want to read color of pixel? like this: color=GetPixel(x,y);

How can I do it in TouchGFX?

2 REPLIES 2
Alexandre RENOUX
Principal

Hello,

There's not such feature for the box widget.

If you want to change each pixel on the screen, one way would be to retrieve the pointer of the framebuffer and write directly the values you need.

You can retrieve the framebuffer pointer by calling lockFramebuffer() (see link)

/Alexandre

No... working with buffer is not good idea.

I want to change pixel on coordinates X,Y of widget, and then I want to move widget to new coordinates. What widget can I get, to draw on it's (widget's) canvas?