Re: expose vs draw

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



if you're drawing with cairo, as you should, the operations falling
outside of the clipped region will be discarded automatically by
cairo.

if you're referring to you own calculations, and you want to save some
time with those, then you can get the clip extents from the cairo_t
itself.

ciao,
 Emmanuele.


On 16 July 2014 17:57, ax487 <ax487@xxxxxx> wrote:
> Well, assume that drawing the widget requires a large amount of work per
> pixel. If I knew the region that I need to repaint then I could save
> myself a lot of time. If the context is clipped this would not help much
> if I don't know the relevant region, would it?
>
> On 16.07.2014 18:36, Jasper St. Pierre wrote:
>> The cairo context you get is already clipped to the exposed region. You
>> don't need to do any extra work.
>>
>>
>> On Wed, Jul 16, 2014 at 12:33 PM, ax487 <ax487@xxxxxx> wrote:
>>
>>> Hello all,
>>>
>>> I am currently porting an application from gtk2 to gtk3. I just noticed
>>> that the "expose_event" is no longer supported, instead there is a
>>> "draw" signal. I was just wondering, the "expose_event" always came with
>>> a GdkEventExpose* attached which did in particular contain the rectangle
>>> which was invalidated. Is it possible to obtain the invalidated
>>> rectangle inside the "draw" handler or is it necessary to repaint the
>>> entire widget? (I could not find a suitable function in the gtk3/gdk3
>>> documentation so far)
>>>
>>> ax487
>>> _______________________________________________
>>> gtk-list mailing list
>>> gtk-list@xxxxxxxxx
>>> https://mail.gnome.org/mailman/listinfo/gtk-list
>>>
>>
>>
>>
> _______________________________________________
> gtk-list mailing list
> gtk-list@xxxxxxxxx
> https://mail.gnome.org/mailman/listinfo/gtk-list



-- 
W: http://www.emmanuelebassi.name
B: http://blogs.gnome.org/ebassi/
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list




[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux