Tracing an outline in libart


I'm trying to figure out what's involved with putting a "halo", or even
a simple outline around an alpha-masked pixbuf.  The background is that
I'm writing a Canvas Item to highlight graphical images (for a game)
when they're selected.  If I have to, I'll stick with the clunky-looking
selection rectangle I currently have working.  However, I'd much prefer
something a little more professional-looking.

So, given an arbitrarily-shaped pixbuf, how can I trace an outline based
on its alpha mask?  Does libart have any path functions for this?  And
once I have that path, is it possible to blur that line outward to give
the object a sort of glow?  Kind of a stroke-then-blur.

Does anyone know of any code examples for any of this?  Preferrably with
libart/GdkPixbuf.  Or will it take complicated filter algorithms to pull
this off?  The halo is just gratuitous glitz, but if it's not toooo much
trouble, I'd like to give it a try.  I suppose I wouldn't necessarily
even need a path, come to think of it.  I could apply a radial blur to
the masked-out area.  Any suggestions on an algorithm for radial blurs?



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