How to present libmypaint surface as a GTK4 widget

I would like to integrate libmypaint into a GTK4 application. According to this example that draws in GTK4, you use GTKDrawingArea with cairo to draw. According to this example, you use MyPaintFixedTiledSurface to draw with libmypaint and save it to a file.

How do I create a gtk widget that use libmypaint instead of cairo? Can you show me a simple example?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.