[cairo] GTK3+ | draw cairo object by button-click

Harald Schmidt harald_sdt at t-online.de
Mon Jan 18 07:39:27 UTC 2021


Good Morning Stefan,

thank you very much for your helpful answer to my mail. Like your
proposal I added the "gtk_widget_queue_draw(pointer_01);" and it works 
now like it should.

Thanks & Regards
Harald



Am Sonntag, den 17.01.2021, 20:02 +0100 schrieb Stefan Salewski:
> On Sun, 2021-01-17 at 19:21 +0100, Harald Schmidt wrote:
> > The cairo_arc is only visible after button-click and additional
> > mouse-
> > click outside the window. Don't know why mouse-click outside the
> > window
> > is necessary .
> 
> Seems to be more a GTK question?
> 
> My guess is that you missed a queue-draw call. When the darea is
> created the draw method may be called, but then radius is still zero.
> And next update of drawing area occurs only when necessary, or when
> you
> call queueDraw. You should find some examples in C with google, for
> example there is a scribble window example somewhere, I think it is
> called drawing.c now. I am using more Nim and GTK4 now, so I can not
> provide a complete C example yet. But let us know when you should be
> not able to fix it yourself, I can ask google later...
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cairo_gtk.c
Type: text/x-csrc
Size: 1767 bytes
Desc: not available
URL: <https://lists.cairographics.org/archives/cairo/attachments/20210118/f6a7ba69/attachment.c>


More information about the cairo mailing list