Redrawing outside exposed area in a widget



Hi,

I am writing a custom widget which presents a scrollable display when
placed inside a ScrolledWindow. I have two very quick questions:

1) Is it oK to draw (using Gdk primitives) to anywhere on the widget
window during the expose_event handler, or should I confine myself to the
"exposed"  rectangle?

(the reason for wanting to do this is that I am drawing a grid, and I need
to align my drawing to the nearest grid boundaries to the exposed region)

2) Is it oK to draw into negative coordinates (e.g. -5, -20) on the widget
window, for example to allow shapes to be clipped by the left or top edge
of the window, or is there another, more correct way of achieving this?

Thanks in advance for any suggestions any of you might have!

James.





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