Re: gdk_cairo_get_clip_rectangle and DrawingArea in ScrollableWindow

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

 



On Sat, Mar 30, 2013 at 11:22:29PM +0100, pecisk@xxxxxxxxx wrote:
> I have simple scrollable window, which has DrawingArea within it. So before
> I draw anything, I take gdk_cairo_get_clip_rectangle, as I want to get
> width of actually visible area. Then I use it to do drawing to surface and
> then applying it to cairo context.
> 
> However, there's problem. When windows open first I get proper value of
> returned area from gdk_cairo_get_clip_rectangle. However when I do a
> scrolling, it starts to return ten times smaller width, t.i. at the size of
> scrolling step. And every time I scroll it keeps getting this ten times
> smaller width than initial value. What's more interesting, when windows
> lose focus or gets resized, it gets correct width.
> 
> I tried to isolate code and tried not to draw anything on DrawingArea - it
> still returned smaller values.
> 
> What did I miss, what's could be wrong in this case?

Probably nothing is wrong.  You get the rectangle that you actually need
to draw, i.e. the newly uncovered area.  The rest does not need to be
redrawn.

Yeti

_______________________________________________
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