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

On Fri, 27 Oct 2000, Raph Levien wrote:

> "James K. Wiggs" wrote:
> >     Ahh, excellent.  My impression from the documentation and the
> > source code I studied was that the vector paths had to be "closed"
> > in the sense that you can't "lift the pen" once you start drawing.
> > But it *is* possible to mix MOVETOs and LINETOs.  OK, made these
> > changes *and* put the art_vpath_perturb() call back in.  I still
> > get a few of these:
> > 
> > x_order_2: colinear!
> > 
> >    But only about 10 of them for ~430 pricebars.  I suspect that
> > I'm getting them on pricebars where the open/close tics are at
> > the same value.  And also, there are no *visible* plotting
> > artifacts like "blocks" or tics that extend halfway across the
> > graph.
> Thanks, Lauris, for providing such useful help!
> Here's a suggestion that may reduce the colinear warnings. Lauris
> suggests:
> > MOVETO_OPEN (opening tic) LINETO (bar)
> > MOVETO_OPEN (bottom of bar) LINETO (top of bar)
> > MOVETO_OPEN (bar) LINETO (closing tic)
> I'd suggest checking to see if opening and closing tics are equal to the
> top or bottom of the bar, and keeping the pen down in those cases.
> It's a little more code (it looks like you have to check all four cases
> of opening or closing tics matching top or bottom), but you should run
> quite a bit more stably.

   OK, I tried implementing this, but it didn't appear to make any
difference in the number of warnings I got; if anything, it increased
them.  I put in some debugging I/O of my own, trying to get some idea
of *which* pricebars are causing the problem, and what I'm seeing is
that there isn't really any pattern to it.  The warnings come from
bars where none of the four values are equal, ones where the open or
close is "kinda close" to the high or the low, etc.  Then there are
other bars with the same properties that *don't* produce warnings.  I
really can't see any pattern to it, and problems like that always make
me really nervous.

> Hope this helps,
> Raph
> -- 
> Raph Levien <raph artofcode com>  |  artofcode LLC  |

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