class DMJ_SelectorArbitraryCurve(DMJ_PolyCurveSelector) {
; Arbitrary quadratic Bézier curve selector.
public:
import "common.ulb"
func DMJ_SelectorArbitraryCurve(Generic pparent)
DMJ_PolyCurveSelector.DMJ_PolyCurveSelector(pparent)
m_Anchors[0] = @p_anchor1
m_Anchors[1] = @p_anchor2
m_Anchors[2] = @p_anchor3
m_Anchors[3] = @p_anchor4
m_Anchors[4] = @p_anchor5
m_Anchors[5] = @p_anchor6
m_Anchors[6] = @p_anchor7
m_Anchors[7] = @p_anchor8
m_Anchors[8] = @p_anchor9
m_Anchors[9] = @p_anchor10
m_Anchors[10] = @p_anchor11
m_Anchors[11] = @p_anchor12
m_Anchors[12] = @p_anchor13
m_Anchors[13] = @p_anchor14
m_Anchors[14] = @p_anchor15
m_Anchors[15] = @p_anchor16
m_Anchors[16] = @p_anchor17
m_Anchors[17] = @p_anchor18
m_Anchors[18] = @p_anchor19
m_Anchors[19] = @p_anchor20
m_OnCurve[0] = !@p_oncurve1 || !@p_autoclosecurve
m_OnCurve[1] = !@p_oncurve2
m_OnCurve[2] = !@p_oncurve3
m_OnCurve[3] = !@p_oncurve4
m_OnCurve[4] = !@p_oncurve5
m_OnCurve[5] = !@p_oncurve6
m_OnCurve[6] = !@p_oncurve7
m_OnCurve[7] = !@p_oncurve8
m_OnCurve[8] = !@p_oncurve9
m_OnCurve[9] = !@p_oncurve10
m_OnCurve[10] = !@p_oncurve11
m_OnCurve[11] = !@p_oncurve12
m_OnCurve[12] = !@p_oncurve13
m_OnCurve[13] = !@p_oncurve14
m_OnCurve[14] = !@p_oncurve15
m_OnCurve[15] = !@p_oncurve16
m_OnCurve[16] = !@p_oncurve17
m_OnCurve[17] = !@p_oncurve18
m_OnCurve[18] = !@p_oncurve19
m_OnCurve[19] = !@p_oncurve20
m_OnCurve[@p_segmentcount-1] = m_OnCurve[@p_segmentcount-1] || !@p_autoclosecurve
m_CloseCurve[0] = @p_closecurve1
m_CloseCurve[1] = @p_closecurve2
m_CloseCurve[2] = @p_closecurve3
m_CloseCurve[3] = @p_closecurve4
m_CloseCurve[4] = @p_closecurve5
m_CloseCurve[5] = @p_closecurve6
m_CloseCurve[6] = @p_closecurve7
m_CloseCurve[7] = @p_closecurve8
m_CloseCurve[8] = @p_closecurve9
m_CloseCurve[9] = @p_closecurve10
m_CloseCurve[10] = @p_closecurve11
m_CloseCurve[11] = @p_closecurve12
m_CloseCurve[12] = @p_closecurve13
m_CloseCurve[13] = @p_closecurve14
m_CloseCurve[14] = @p_closecurve15
m_CloseCurve[15] = @p_closecurve16
m_CloseCurve[16] = @p_closecurve17
m_CloseCurve[17] = @p_closecurve18
m_CloseCurve[18] = @p_closecurve19
m_CloseCurve[19] = @p_closecurve20
m_CloseCurve[@p_segmentcount-1] = @p_autoclosecurve
endfunc
func SetCurve(DMJ_PolyCurve &pcurve)
pcurve.SetSegmentCount(@p_segmentcount)
int j = 0
int closed = 0 ; curve is not closed at this point
complex anchor = 0
bool haveanchor = false ; no anchor (on-curve) point saved
while (j < @p_segmentcount)
if (m_CloseCurve[j]) ; this point closes the curve
closed = 1 ; set this auto flag (close curve)
endif
if (m_OnCurve[j]) ; this is an on-curve point; we may not write it this iteration
if (haveanchor) ; previous point was on-curve (two consecutive on-curve points)
pcurve.SetSegment(-1, 1, 0, anchor, 0, 0) ; create a straight line from that point
endif
if (closed == 1) ; curve should be closed after this point
haveanchor = false ; so there cannot be a saved anchor point
pcurve.SetSegment(-1, 1, closed, m_Anchors[j], 0, 0) ; create line segment to this point
else ; curve should not be closed after this point
haveanchor = true ; we now have a saved anchor point
anchor = m_Anchors[j] ; save its location
endif
else ; this is an off-curve point; always write it this cycle
if (haveanchor) ; we have an on-curve point to link it to
pcurve.SetSegment(-1, 2, closed, anchor, m_Anchors[j], 0) ; create curve segment
haveanchor = false ; last point was off-curve
else ; no on-curve point to link to
pcurve.SetSegment(-1, 2, closed + 2, 0, m_Anchors[j], 0) ; create auto-curved segment
endif
endif
j = j + 1
closed = 0
endwhile
if (haveanchor) ; trailing unclosed on-curve point (always happens with unclosed curves)
pcurve.SetSegment(-1, 0, 0, anchor, 0, 0) ; add this point so the last segment will connect to it
endif
endfunc
func SetHandles(Handles phandles)
DMJ_PolyCurveSelector.SetHandles(phandles)
phandles.SetHandleCount(@p_segmentcount*2,@p_segmentcount*2,0,0)
int j = 0
int loopstart = 0
bool offcurve = false
while (j < @p_segmentcount)
if (m_OnCurve[j])
if (offcurve)
phandles.SetHandleLine(-1, 2, false, m_Anchors[j-1], m_Anchors[j])
endif
phandles.SetHandlePoint(-1, 1, j+1, 0, m_Anchors[j], 0)
offcurve = false
else
if (offcurve)
phandles.SetHandlePoint(-1, 4, 0, 0, (m_Anchors[j]+m_Anchors[j-1]) / 2, 0)
endif
phandles.SetHandlePoint(-1, 2, j+1, 0, m_Anchors[j], 0)
phandles.SetHandleLine(-1, 2, false, m_Anchors[j-1], m_Anchors[j])
offcurve = true
endif
if (m_CloseCurve[j] || j == @p_segmentcount-1)
if (!m_OnCurve[j] && !m_OnCurve[loopstart])
phandles.SetHandlePoint(-1, 4, 0, 0, (m_Anchors[j]+m_Anchors[loopstart]) / 2, 0)
endif
phandles.SetHandleLine(-1, 2, false, m_Anchors[loopstart], m_Anchors[j])
loopstart = j + 1
offcurve = false
endif
j = j + 1
endwhile
endfunc
protected:
complex m_Anchors[20]
bool m_OnCurve[20]
bool m_CloseCurve[20]
default:
title = "Arbitrary Bézier Curve"
int param v_dmj_selectorarbitrarycurve
caption = "Version (DMJ_SelectorArbitraryCurve)"
default = 100
hint = "This version parameter is used to detect when a change has been made to the formula that is incompatible with the previous version. When that happens, this field will reflect the old version number to alert you to the fact that an alternate rendering is being used."
visible = @v_dmj_selectorarbitrarycurve < 100
endparam
int param p_segmentcount
caption = "Number of segments"
default = 3
min = 3
max = 20
hint = "Sets the number of curve segments in the shape."
endparam
complex param p_anchor1
caption = "Point 1"
default = #center + (-1/#magn + flip(0.5/#magn)) * ((0,1)^(#angle*2/#pi))
visible = (@p_segmentcount >= 1)
hint = "Sets the location of point 1 in the curve shape."
endparam
bool param p_oncurve1
caption = "Smooth"
default = true
visible = (@p_segmentcount >= 1 && @p_autoclosecurve)
hint = "Sets whether this point will be smooth or not. Use sequences of smooth points \
to produce a smooth curve. Uncheck this box to create a sharp point (a corner) \
and uncheck it for several points in a row to create line segments. \
Whenever you have sequences of smooth points, the curve generator will show you \
the 'touching points' with X handles."
endparam
bool param p_closecurve1
caption = "Close curve"
default = false
visible = (@p_segmentcount >= 2)
hint = "Sets whether the curve will be closed at this point. Curves must contain \
at least three points."
endparam
complex param p_anchor2
caption = "Point 2"
default = #center + (1/#magn + flip(0.5/#magn)) * ((0,1)^(#angle*2/#pi))
visible = (@p_segmentcount >= 2)
hint = "Sets the location of point 2 in the curve shape."
endparam
bool param p_oncurve2
caption = "Smooth"
default = true
visible = (@p_segmentcount >= 2 && !(@p_segmentcount == 2 && !@p_autoclosecurve))
hint = "Sets whether this point will be smooth or not. Use sequences of smooth points \
to produce a smooth curve. Uncheck this box to create a sharp point (a corner) \
and uncheck it for several points in a row to create line segments. \
Whenever you have sequences of smooth points, the curve generator will show you \
the 'touching points' with X handles."
endparam
bool param p_closecurve2
caption = "Close curve"
default = false
visible = (@p_segmentcount >= 3)
hint = "Sets whether the curve will be closed at this point. Curves must contain \
at least three points."
endparam
complex param p_anchor3
caption = "Point 3"
default = #center + (1/#magn + flip(-0.5/#magn)) * ((0,1)^(#angle*2/#pi))
visible = (@p_segmentcount >= 3)
hint = "Sets the location of point 3 in the curve shape."
endparam
bool param p_oncurve3
caption = "Smooth"
default = true
visible = (@p_segmentcount >= 3 && !(@p_segmentcount == 3 && !@p_autoclosecurve))
hint = "Sets whether this point will be smooth or not. Use sequences of smooth points \
to produce a smooth curve. Uncheck this box to create a sharp point (a corner) \
and uncheck it for several points in a row to create line segments. \
Whenever you have sequences of smooth points, the curve generator will show you \
the 'touching points' with X handles."
endparam
bool param p_closecurve3
caption = "Close curve"
default = false
visible = (@p_segmentcount >= 4)
hint = "Sets whether the curve will be closed at this point. Curves must contain \
at least three points."
endparam
complex param p_anchor4
caption = "Point 4"
default = #center + (-1/#magn + flip(-0.5/#magn)) * ((0,1)^(#angle*2/#pi))
visible = (@p_segmentcount >= 4)
hint = "Sets the location of point 4 in the curve shape."
endparam
bool param p_oncurve4
caption = "Smooth"
default = true
visible = (@p_segmentcount >= 4 && !(@p_segmentcount == 4 && !@p_autoclosecurve))
hint = "Sets whether this point will be smooth or not. Use sequences of smooth points \
to produce a smooth curve. Uncheck this box to create a sharp point (a corner) \
and uncheck it for several points in a row to create line segments. \
Whenever you have sequences of smooth points, the curve generator will show you \
the 'touching points' with X handles."
endparam
bool param p_closecurve4
caption = "Close curve"
default = false
visible = (@p_segmentcount >= 5)
hint = "Sets whether the curve will be closed at this point. Curves must contain \
at least three points."
endparam
complex param p_anchor5
caption = "Point 5"
default = #center + (-1/#magn + flip(0.5/#magn)) * ((0,1)^(#angle*2/#pi))
visible = (@p_segmentcount >= 5)
hint = "Sets the location of point 5 in the curve shape."
endparam
bool param p_oncurve5
caption = "Smooth"
default = true
visible = (@p_segmentcount >= 5 && !(@p_segmentcount == 5 && !@p_autoclosecurve))
hint = "Sets whether this point will be smooth or not. Use sequences of smooth points \
to produce a smooth curve. Uncheck this box to create a sharp point (a corner) \
and uncheck it for several points in a row to create line segments. \
Whenever you have sequences of smooth points, the curve generator will show you \
the 'touching points' with X handles."
endparam
bool param p_closecurve5
caption = "Close curve"
default = false
visible = (@p_segmentcount >= 6)
hint = "Sets whether the curve will be closed at this point. Curves must contain \
at least three points."
endparam
complex param p_anchor6
caption = "Point 6"
default = #center + (-1/#magn + flip(0.5/#magn)) * ((0,1)^(#angle*2/#pi))
visible = (@p_segmentcount >= 6)
hint = "Sets the location of point 6 in the curve shape."
endparam
bool param p_oncurve6
caption = "Smooth"
default = true
visible = (@p_segmentcount >= 6 && !(@p_segmentcount == 6 && !@p_autoclosecurve))
hint = "Sets whether this point will be smooth or not. Use sequences of smooth points \
to produce a smooth curve. Uncheck this box to create a sharp point (a corner) \
and uncheck it for several points in a row to create line segments. \
Whenever you have sequences of smooth points, the curve generator will show you \
the 'touching points' with X handles."
endparam
bool param p_closecurve6
caption = "Close curve"
default = false
visible = (@p_segmentcount >= 7)
hint = "Sets whether the curve will be closed at this point. Curves must contain \
at least three points."
endparam
complex param p_anchor7
caption = "Point 7"
default = #center + (-1/#magn + flip(0.5/#magn)) * ((0,1)^(#angle*2/#pi))
visible = (@p_segmentcount >= 7)
hint = "Sets the location of point 7 in the curve shape."
endparam
bool param p_oncurve7
caption = "Smooth"
default = true
visible = (@p_segmentcount >= 7 && !(@p_segmentcount == 7 && !@p_autoclosecurve))
hint = "Sets whether this point will be smooth or not. Use sequences of smooth points \
to produce a smooth curve. Uncheck this box to create a sharp point (a corner) \
and uncheck it for several points in a row to create line segments. \
Whenever you have sequences of smooth points, the curve generator will show you \
the 'touching points' with X handles."
endparam
bool param p_closecurve7
caption = "Close curve"
default = false
visible = (@p_segmentcount >= 8)
hint = "Sets whether the curve will be closed at this point. Curves must contain \
at least three points."
endparam
complex param p_anchor8
caption = "Point 8"
default = #center + (-1/#magn + flip(0.5/#magn)) * ((0,1)^(#angle*2/#pi))
visible = (@p_segmentcount >= 8)
hint = "Sets the location of point 8 in the curve shape."
endparam
bool param p_oncurve8
caption = "Smooth"
default = true
visible = (@p_segmentcount >= 8 && !(@p_segmentcount == 8 && !@p_autoclosecurve))
hint = "Sets whether this point will be smooth or not. Use sequences of smooth points \
to produce a smooth curve. Uncheck this box to create a sharp point (a corner) \
and uncheck it for several points in a row to create line segments. \
Whenever you have sequences of smooth points, the curve generator will show you \
the 'touching points' with X handles."
endparam
bool param p_closecurve8
caption = "Close curve"
default = false
visible = (@p_segmentcount >= 9)
hint = "Sets whether the curve will be closed at this point. Curves must contain \
at least three points."
endparam
complex param p_anchor9
caption = "Point 9"
default = #center + (-1/#magn + flip(0.5/#magn)) * ((0,1)^(#angle*2/#pi))
visible = (@p_segmentcount >= 9)
hint = "Sets the location of point 9 in the curve shape."
endparam
bool param p_oncurve9
caption = "Smooth"
default = true
visible = (@p_segmentcount >= 9 && !(@p_segmentcount == 9 && !@p_autoclosecurve))
hint = "Sets whether this point will be smooth or not. Use sequences of smooth points \
to produce a smooth curve. Uncheck this box to create a sharp point (a corner) \
and uncheck it for several points in a row to create line segments. \
Whenever you have sequences of smooth points, the curve generator will show you \
the 'touching points' with X handles."
endparam
bool param p_closecurve9
caption = "Close curve"
default = false
visible = (@p_segmentcount >= 10)
hint = "Sets whether the curve will be closed at this point. Curves must contain \
at least three points."
endparam
complex param p_anchor10
caption = "Point 10"
default = #center + (-1/#magn + flip(0.5/#magn)) * ((0,1)^(#angle*2/#pi))
visible = (@p_segmentcount >= 10)
hint = "Sets the location of point 10 in the curve shape."
endparam
bool param p_oncurve10
caption = "Smooth"
default = true
visible = (@p_segmentcount >= 10 && !(@p_segmentcount == 10 && !@p_autoclosecurve))
hint = "Sets whether this point will be smooth or not. Use sequences of smooth points \
to produce a smooth curve. Uncheck this box to create a sharp point (a corner) \
and uncheck it for several points in a row to create line segments. \
Whenever you have sequences of smooth points, the curve generator will show you \
the 'touching points' with X handles."
endparam
bool param p_closecurve10
caption = "Close curve"
default = false
visible = (@p_segmentcount >= 11)
hint = "Sets whether the curve will be closed at this point. Curves must contain \
at least three points."
endparam
complex param p_anchor11
caption = "Point 11"
default = #center + (-1/#magn + flip(0.5/#magn)) * ((0,1)^(#angle*2/#pi))
visible = (@p_segmentcount >= 11)
hint = "Sets the location of point 11 in the curve shape."
endparam
bool param p_oncurve11
caption = "Smooth"
default = true
visible = (@p_segmentcount >= 11 && !(@p_segmentcount == 11 && !@p_autoclosecurve))
hint = "Sets whether this point will be smooth or not. Use sequences of smooth points \
to produce a smooth curve. Uncheck this box to create a sharp point (a corner) \
and uncheck it for several points in a row to create line segments. \
Whenever you have sequences of smooth points, the curve generator will show you \
the 'touching points' with X handles."
endparam
bool param p_closecurve11
caption = "Close curve"
default = false
visible = (@p_segmentcount >= 12)
hint = "Sets whether the curve will be closed at this point. Curves must contain \
at least three points."
endparam
complex param p_anchor12
caption = "Point 12"
default = #center + (-1/#magn + flip(0.5/#magn)) * ((0,1)^(#angle*2/#pi))
visible = (@p_segmentcount >= 12)
hint = "Sets the location of point 12 in the curve shape."
endparam
bool param p_oncurve12
caption = "Smooth"
default = true
visible = (@p_segmentcount >= 12 && !(@p_segmentcount == 12 && !@p_autoclosecurve))
hint = "Sets whether this point will be smooth or not. Use sequences of smooth points \
to produce a smooth curve. Uncheck this box to create a sharp point (a corner) \
and uncheck it for several points in a row to create line segments. \
Whenever you have sequences of smooth points, the curve generator will show you \
the 'touching points' with X handles."
endparam
bool param p_closecurve12
caption = "Close curve"
default = false
visible = (@p_segmentcount >= 13)
hint = "Sets whether the curve will be closed at this point. Curves must contain \
at least three points."
endparam
complex param p_anchor13
caption = "Point 13"
default = #center + (-1/#magn + flip(0.5/#magn)) * ((0,1)^(#angle*2/#pi))
visible = (@p_segmentcount >= 13)
hint = "Sets the location of point 13 in the curve shape."
endparam
bool param p_oncurve13
caption = "Smooth"
default = true
visible = (@p_segmentcount >= 13 && !(@p_segmentcount == 13 && !@p_autoclosecurve))
hint = "Sets whether this point will be smooth or not. Use sequences of smooth points \
to produce a smooth curve. Uncheck this box to create a sharp point (a corner) \
and uncheck it for several points in a row to create line segments. \
Whenever you have sequences of smooth points, the curve generator will show you \
the 'touching points' with X handles."
endparam
bool param p_closecurve13
caption = "Close curve"
default = false
visible = (@p_segmentcount >= 14)
hint = "Sets whether the curve will be closed at this point. Curves must contain \
at least three points."
endparam
complex param p_anchor14
caption = "Point 14"
default = #center + (-1/#magn + flip(0.5/#magn)) * ((0,1)^(#angle*2/#pi))
visible = (@p_segmentcount >= 14)
hint = "Sets the location of point 14 in the curve shape."
endparam
bool param p_oncurve14
caption = "Smooth"
default = true
visible = (@p_segmentcount >= 14 && !(@p_segmentcount == 14 && !@p_autoclosecurve))
hint = "Sets whether this point will be smooth or not. Use sequences of smooth points \
to produce a smooth curve. Uncheck this box to create a sharp point (a corner) \
and uncheck it for several points in a row to create line segments. \
Whenever you have sequences of smooth points, the curve generator will show you \
the 'touching points' with X handles."
endparam
bool param p_closecurve14
caption = "Close curve"
default = false
visible = (@p_segmentcount >= 15)
hint = "Sets whether the curve will be closed at this point. Curves must contain \
at least three points."
endparam
complex param p_anchor15
caption = "Point 15"
default = #center + (-1/#magn + flip(0.5/#magn)) * ((0,1)^(#angle*2/#pi))
visible = (@p_segmentcount >= 15)
hint = "Sets the location of point 15 in the curve shape."
endparam
bool param p_oncurve15
caption = "Smooth"
default = true
visible = (@p_segmentcount >= 15 && !(@p_segmentcount == 15 && !@p_autoclosecurve))
hint = "Sets whether this point will be smooth or not. Use sequences of smooth points \
to produce a smooth curve. Uncheck this box to create a sharp point (a corner) \
and uncheck it for several points in a row to create line segments. \
Whenever you have sequences of smooth points, the curve generator will show you \
the 'touching points' with X handles."
endparam
bool param p_closecurve15
caption = "Close curve"
default = false
visible = (@p_segmentcount >= 16)
hint = "Sets whether the curve will be closed at this point. Curves must contain \
at least three points."
endparam
complex param p_anchor16
caption = "Point 16"
default = #center + (-1/#magn + flip(0.5/#magn)) * ((0,1)^(#angle*2/#pi))
visible = (@p_segmentcount >= 16)
hint = "Sets the location of point 16 in the curve shape."
endparam
bool param p_oncurve16
caption = "Smooth"
default = true
visible = (@p_segmentcount >= 16 && !(@p_segmentcount == 16 && !@p_autoclosecurve))
hint = "Sets whether this point will be smooth or not. Use sequences of smooth points \
to produce a smooth curve. Uncheck this box to create a sharp point (a corner) \
and uncheck it for several points in a row to create line segments. \
Whenever you have sequences of smooth points, the curve generator will show you \
the 'touching points' with X handles."
endparam
bool param p_closecurve16
caption = "Close curve"
default = false
visible = (@p_segmentcount >= 17)
hint = "Sets whether the curve will be closed at this point. Curves must contain \
at least three points."
endparam
complex param p_anchor17
caption = "Point 17"
default = #center + (-1/#magn + flip(0.5/#magn)) * ((0,1)^(#angle*2/#pi))
visible = (@p_segmentcount >= 17)
hint = "Sets the location of point 17 in the curve shape."
endparam
bool param p_oncurve17
caption = "Smooth"
default = true
visible = (@p_segmentcount >= 17 && !(@p_segmentcount == 17 && !@p_autoclosecurve))
hint = "Sets whether this point will be smooth or not. Use sequences of smooth points \
to produce a smooth curve. Uncheck this box to create a sharp point (a corner) \
and uncheck it for several points in a row to create line segments. \
Whenever you have sequences of smooth points, the curve generator will show you \
the 'touching points' with X handles."
endparam
bool param p_closecurve17
caption = "Close curve"
default = false
visible = (@p_segmentcount >= 18)
hint = "Sets whether the curve will be closed at this point. Curves must contain \
at least three points."
endparam
complex param p_anchor18
caption = "Point 18"
default = #center + (-1/#magn + flip(0.5/#magn)) * ((0,1)^(#angle*2/#pi))
visible = (@p_segmentcount >= 18)
hint = "Sets the location of point 18 in the curve shape."
endparam
bool param p_oncurve18
caption = "Smooth"
default = true
visible = (@p_segmentcount >= 18 && !(@p_segmentcount == 18 && !@p_autoclosecurve))
hint = "Sets whether this point will be smooth or not. Use sequences of smooth points \
to produce a smooth curve. Uncheck this box to create a sharp point (a corner) \
and uncheck it for several points in a row to create line segments. \
Whenever you have sequences of smooth points, the curve generator will show you \
the 'touching points' with X handles."
endparam
bool param p_closecurve18
caption = "Close curve"
default = false
visible = (@p_segmentcount >= 19)
hint = "Sets whether the curve will be closed at this point. Curves must contain \
at least three points."
endparam
complex param p_anchor19
caption = "Point 19"
default = #center + (-1/#magn + flip(0.5/#magn)) * ((0,1)^(#angle*2/#pi))
visible = (@p_segmentcount >= 19)
hint = "Sets the location of point 19 in the curve shape."
endparam
bool param p_oncurve19
caption = "Smooth"
default = true
visible = (@p_segmentcount >= 19 && !(@p_segmentcount == 19 && !@p_autoclosecurve))
hint = "Sets whether this point will be smooth or not. Use sequences of smooth points \
to produce a smooth curve. Uncheck this box to create a sharp point (a corner) \
and uncheck it for several points in a row to create line segments. \
Whenever you have sequences of smooth points, the curve generator will show you \
the 'touching points' with X handles."
endparam
bool param p_closecurve19
caption = "Close curve"
default = false
visible = (@p_segmentcount >= 20)
hint = "Sets whether the curve will be closed at this point. Curves must contain \
at least three points."
endparam
complex param p_anchor20
caption = "Point 20"
default = #center + (-1/#magn + flip(0.5/#magn)) * ((0,1)^(#angle*2/#pi))
visible = (@p_segmentcount >= 20)
hint = "Sets the location of point 20 in the curve shape."
endparam
bool param p_oncurve20
caption = "Smooth"
default = true
visible = (@p_segmentcount >= 20 && !(@p_segmentcount == 20 && !@p_autoclosecurve))
hint = "Sets whether this point will be smooth or not. Use sequences of smooth points \
to produce a smooth curve. Uncheck this box to create a sharp point (a corner) \
and uncheck it for several points in a row to create line segments. \
Whenever you have sequences of smooth points, the curve generator will show you \
the 'touching points' with X handles."
endparam
bool param p_closecurve20
caption = "Close curve"
default = false
visible = (@p_segmentcount >= 21)
hint = "Sets whether the curve will be closed at this point. Curves must contain \
at least three points."
endparam
bool param p_autoclosecurve
caption = "Close curve"
default = true
hint = "Sets whether the curve will be closed at the end. Closed curves are required for some uses."
endparam
}