[Gnome-print] Re: GnomeCanvasBpath



Hello

What I have seen from screenshots, the transformed arrowheads look like
wonderful! Nice work.

> A few weeks ago I hacked the ability to draw "correct" arrowheads on a
> bpath item.  The arrowheads are constructed the same way that MetaPost
> constructs its arrowheads but cutting the end of the bpath, rotating
> then forming a polygon with the two rotations.  Of course its more
> complicated then that in real life.
> 
> How I do it is transform the bpath to a vpath via libart, trace the
> vpath until a specified arrowhead distance while building a second
> vpath.  With the second vpath now I duplicate and rotate to the
> specified angle then finally, I concat the path with a third path
> depending on what the end of the arrowhead is supposed to look like,
> then I finally render the svp.
> 
> Now the caveat here is that the arrowheads only work for a
> bpath object in a "line", now a filled bpath object.  I'm not yet sure
> how the algorithm will behave it if it activated on a filled object.
> I'll try it tonite, but I'm sure it will be pretty silly.

But why would anybody want arrowheads on closed path?

GnomeCanvasBPath separates its path into closed and open regions before
rendering, so it would be quite natural to draw arrowheads only to
open parts of complex path.

> Now the question is do you guys want this code to be merged into
> gnome-print?  Or is there not a general interest in this feature?

It really shouldn't go to gnome-print, which has a bit different
profile.
But as current GnomeCanvasBPath is in gnome-print, you can definitely
merge
it with the one there. I very much hope that the bpath item will be
moved to
main gnome-libs in near future.

Federico - how about moving GnomeCanvasBpath and GnomeCanvasClipGroup
into
libgnomeui?

Lauris Kaplinski






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