[cairo] Button Graphic
bobby8934 at inbox.com
Mon Jan 28 16:58:38 PST 2008
If there were a decent "PATH GRADIENT" implementation in Cairo, these effects would be trivial. Wink, wink, nudge, nudge. ;-)
> -----Original Message-----
> From: jeremy at emperorlinux.com
> Sent: Mon, 28 Jan 2008 14:39:35 -0500
> To: cairo at cairographics.org
> Subject: [cairo] Button Graphic
> Hello all. :)
> I'm using Cairo with OpenSceneGraph to create a HUD system, and I'm
> working on creating a demo which will use Cairo to render a nice, vector
> button object at any resolution. The first screenshot is my "base"
> button image, and the second screenshot is my _attempt_ at adding a
> "glossy overlay" that will be rendered when the mouse is over the
> button. However, as you can see, the "gloss" is extremely poor, and done
> My question is: how would you guys achieve this same effect with high
> quality results? First of all, I'm not entire sure I'm even approaching
> it properly: I create a radial gradient, set the operator to ATOP and
> extend to NONE, and fill_preserve() that on top of my existing "base"
> button. The main visual unsightliness (imo) is the jaggies along the
> edge of the radial gradient, which I'm guessing are a result of my
> improper usage of the ATOP operator...
> Also: do you think it would look better if I just "glossed" the inner
> part of the button, leaving the outlines unaffected? ANY recommendations
> are welcome, as I'm coming back to Cairo after a very long hiatus and
> never really fully learned the essentials of vector graphics in the
> first place (though I've become quite good at using and wrapping the
> API :)).
> cairo mailing list
> cairo at cairographics.org
More information about the cairo