Re: problems understanding gtk3/gdk/cairo interaction





Hi John and Simon,

OK, experiment complete. Performance for me is very clearly not as good as Xlib-style XOR when drawing rubberband lines which span a screen-sized window (which is more or less typical for my apps, unfortunately), but on the other hand it's not unusable either, just somewhat annoyingly jerky. With smaller drawing areas (e.g., 300x300) the rubberbanding is perfectly smooth. Playing around with motion hint events might clean this up a little more. I'm basically doing a cairo_rectangle()/cairo_fill() from my entire off-screen surface to the GtkDrawingArea after every MotionNotify event. There are special cases, e.g., small rectangular rubberband boxes, where this is horrific overkill, but I also have cases where I need to rubberband larger collections of unpredictably-oriented line segments which span the full window, so I think my worst-case scenario experimental implementation has been a reasonable test. The outcome could have been worse, and I was expecting that it would be! For now I'll tell my users to wait 5 years and then buy new hardware. ;->

Thanks for all your suggestions!

Roger



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