Re: [LIBART] Working on new canvas item...
- From: Raph Levien <raph acm org>
- To: "James K. Wiggs" <wiggs novum-millennium org>
- Cc: gnome-list gnome org, libart gnome org
- Subject: Re: [LIBART] Working on new canvas item...
- Date: Fri, 27 Oct 2000 00:27:59 -0700
"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).
Hope this helps.
Raph
-- 
Raph Levien <raph artofcode com>  |  artofcode LLC  |  www.artofcode.com
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]