Page 1 of 1

Path sintaxis

Posted: Fri Mar 13, 2009 7:47 am
by fedor
Parsing the path

Code: Select all

path bm {
    MOVETO {}   
    50*{r (360/50) s .99 1.1}CURVETO {y 1}
}

ContextFreeCLI.exe on XP writes
Parse error - Smooth curve operations must be preceded by another curve
operation.

This code belong to XpoPen http://www.contextfreeart.org/gallery/u ... 1128.png?0

Tell me please what is wrong ?

Posted: Fri Mar 13, 2009 5:22 pm
by MtnViewJohn
The curve operations require control points to determine the slope of the curve at the end points. The smooth curve operations produce a smooth join with the preceding curve by examining the preceding curve's control points and computing a smooth control point for the current curve. But your example never specifies any control points so this computation cannot be done. You need to either stick a CURVETO before the loop with a control point or have all of the CURVETOs in the loop also have control points.

Also, although I don't know what you are doing I suspect that you will be better off using CURVEREL instead of CURVETO.