Problems with modified version of gtk*ruler widgets.



	I've been modifying the sources for gtk*ruler to make a new ruler
very similar to the standard gtk ruler, except that this ruler supports
tiny and huge numbers, and it's interactive (you can drag it around).

	I completely redesigned the functions that take care of
calculating the tick marks and drawing, to a more CPU intensive code (I
don't know if it can be optimized). 

	When I took a look at the exposed event, I saw that the standard
gtk ruler redraws the tick marks into the backing-store pixmap *every
time* it receives an expose event and then copies (blits) it to the
widget's window.  

	Since my rendering functions take a lot longer than the old ones,
I decided not to redraw the backing-store pixmap, but to merely copy it to
the widget's window during the expose event. Then I had to keep track of
when I really needed to render the backing-store pixmap. I figured I'd
have to that in the ruler_set_scale() function and in the realize event
handling of the widget. It worked well, except for the initial expose,
wich appears with a corrupted pixmap.
	
	Later on, I called the rendering function on the configure event
handler as well, but it stopped working when I upgraded to gtk-1.2.5. Can
anyone tell me what I'm doing wrong? If anyone wants the source, just
ask...
 __                  _
/__    __|_ _.   _  /  _.._._  _ o.__ 
\_||_|_> |_(_|\/(_) \_(_|| | |(/_||(_)
[reinolinux.fe.up.pt/~ee96090]
                                       



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