Re: [LIBART] Working on new canvas item...



On Fri, 27 Oct 2000, Raph Levien wrote:

> "James K. Wiggs" wrote:
> 
> >  ...
> >     gnome_canvas_item_update_svp_clip( item, &pbar->svp,
> >         art_svp_from_vpath(vpath2), clip_path );
> >  ...
> > 
> >    To me, this code seems pretty straightforward.  What I get on the
> > canvas, of course, is nothing like what it should be.  I get a bunch
> > of fat rectangles, whose only relationship to the proper appearance
> > is that they appear to be getting placed roughly where they are
> > supposed to on the canvas.  The only thing I can think of is that
> > somehow the "width" of the line that the libart routines are drawing
> > is somehow being set to some huge value, so that the lines are so
> > thick they *look* like boxes.
> > 
> >    Can anyone see *anything* offhand here that might be leading to
> > the problem?  The canvas/world coordinates are identical at the
> > moment, save for a translation in the y dimension.  I have not been
> > messing around with the affines to scale the thing to fit my window
> > yet, so I doubt that that is the cause.  The value of the tic_length
> > is on the order of 1.0, and I have tried fiddling it back and forth
> > a little.  No effect that I can see.
> > 
> >    How do we set the "width" of the strokes that libart uses when
> > rendering its vector paths?
> 
> You need to be calling art_svp_vpath_stroke() rather than
> art_svp_from_vpath(). That has the line width and other options. The
> wierd behavior you're seeing is because the render routines don't handle
> unclosed paths gracefully at all. Fortunately, the output from
> art_svp_from_vpath is always closed (modulo some known numerical
> stability bugs).

   Hmmm.  Should I explicitly start the path with an ART_MOVETO_OPEN
instead of an ART_MOVETO, given that it is an unclosed path?  Or will
it make any difference?

> Hope this helps.
> 
> Raph
> 
> -- 
> Raph Levien <raph artofcode com>  |  artofcode LLC  |  www.artofcode.com
> 
> _______________________________________________
> Libart mailing list
> Libart gnome org
> http://mail.gnome.org/mailman/listinfo/libart
> 





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