Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What basic pattern should I follow when using a DrawingArea?

0
Posted

What basic pattern should I follow when using a DrawingArea?

0

The DrawingArea (and drawing in GTK+ in general) is peculiar in the sense that you never draw directly to the widget. Instead, you tell the X server the widget needs to be drawn, then the X server calls you back telling you to draw an area of your widget. This important because if you don’t follow this pattern, either what you draw won’t be displayed, or it will fail to redraw when the window is covered and subsequently uncovered. The key to this pattern is the ‘expose-event’ signal.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.