Path sintaxis

If you're having trouble using Context Free or don't understand the language, ask for help here.

Moderators: MtnViewJohn, chris, mtnviewmark

Post Reply
fedor
Posts: 4
Joined: Sun Mar 01, 2009 7:32 am

Path sintaxis

Post 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 ?

User avatar
MtnViewJohn
Site Admin
Posts: 882
Joined: Fri May 06, 2005 2:26 pm
Location: Mountain View, California
Contact:

Post 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.

Post Reply