Re: Drawing lines with libart



On Wed, Nov 17, 1999 at 10:42:50PM +0100, Mathieu Lacage wrote:
> Lyndon Drake <lyndon@stat.auckland.ac.nz> writes:
> > In the latest of my long succession of libart questions: how does 
> > art_svp_vpath_stroke work?  This code, which I think should work, doesn't
> > draw anything, which is a little frustrating.  x0 < x1 and y0 < y1 in all
> > cases.  MITER_LIMIT is 4, and FLATNESS is 0.25 (what are these?).  width
> > is 1.
> > 
> > 	vpath[0].code = ART_MOVETO; vpath[0].x = x1; vpath[0].y = y1;
> > 	vpath[1].code = ART_LINETO; vpath[1].x = x0; vpath[1].y = y0;
> > 	vpath[2].code = ART_END; vpath[2].x = 0; vpath[2].y = 0;
> 
> mm... The VPath is a closed path: it should be closed (ie: the last point must
> be exactly on the first point)
> If you want an open vpath, use ART_MOVETO_OPEN

I feel a bit stupid: the problem was an uninitialised variable.  It all works
now.

-- 
Lyndon Drake                       | Desktop:      http://www.gnome.org
isenguard                          | Mail client:  http://www.mutt.org
ICQ#: 12558803                     | Editor:       http://www.vim.org
http://stat.auckland.ac.nz/~lyndon | OS:           http://www.linux.com



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