On Sun, 2009-07-12 at 23:31 +0200, Alexander Teinum wrote: > Hi Clutterers. :) > > I want to create a tab-widget with a path consisting of a couple of > arcs and four lines. The path will be filled with a gradient and the > arcs have to be smooth (anti-aliased). > > I have managed to draw the widget as I want it with > ClutterCairoTexture, but I'm wondering if it's better to do it with > COGL.
no. the COGL primitives API does not paint anti-aliased lines, and it doesn't support[0] gradients. > Better as in better hardware accelerated performance and perhaps > that it's somehow "more native" to Clutter (although I'm not sure if > there's a difference in that sense). there is no difference in terms of "nativeness"; the performance issue is true, though: we use a non-hw accelerated Cairo surface, so you need to make sure you're not updating the contents of the CairoTexture needlessly -- you should draw on your cairo_t* only when the allocation changes, and possibly only if the allocation size is different than the size of the CairoTexture surface. we plan to add more features to the COGL primitives, including anti-aliasing and gradients, but they are for future development cycles. ciao, Emmanuele. [0] it is possible to set up a linear gradient by changing the color at different vertices, but it won't work as well as the Cairo pattern API. -- Emmanuele Bassi, Senior Engineer | emmanuele.ba...@intel.com Intel Open Source Technology Center | http://oss.intel.com -- To unsubscribe send a mail to clutter+unsubscr...@o-hand.com