Specifies the curvature of the line.
The value is a multiplier to increase or decrease the radius of the curve.
0: No curve
1: Creates a curve of an exact half circle.
>1 creates a shallower curve.
<1 creates a bulging curve.
Pass as negative to sweep clockwise.
The allowable range of the curve values is 10 (shallow curve) and 1/40 (huge curve).
Curves should not be used with the following properties: ◼RulerMode ◼Above and below positions for LabelPosition
Note: ◼The Alt+Up/Down keys can be used to increase/decrease curvature if vkiLayerEditing is included in KeyInteract ◼If mlEditLayerPoints is included in MouseInteractLayers, then holding down the Alt key and clicking and dragging a line layer will convert it to a curve
// LEFT EYE // Add an ellipse shape layer ImageEnView1.LayersAdd( iesEllipse, 100, 100, 30, 30 );
// RIGHT EYE // Add an ellipse shape layer ImageEnView1.LayersAdd( iesEllipse, 170, 100, 30, 30 );
// SMILE // Add a line layer ImageEnView1.LayersAdd( Point( 100, 150 ), Point( 200, 150 ));
// Curve it TIELineLayer(ImageEnView1.CurrentLayer).Curve := 1;
// Show changes ImageEnView1.Update();
// Button to decrease curve procedure TForm1.btnDecreaseCurveClick(Sender: TObject); const MIN_CURVE = 1/50; // Huge curve MAX_CURVE = 8; // Shallow curve var c: Double; begin if ( ImageEnView1.LayersCurrent >= 0 ) and ( ImageEnView1.CurrentLayer.Kind = ielkLine) then begin c := TIELineLayer(ImageEnView1.CurrentLayer).Curve; if c = 0 then c := -MAX_CURVE else if c > 0 then c := c * 1.1 else c := c * 0.9; if c < -MAX_CURVE then c := 0; // Curve to shallow? Disable curve TIELineLayer(ImageEnView1.CurrentLayer).Curve := c; ImageEnView1.Update(); end; end;
// Button to increase curve procedure TForm1.btnIncreaseCurveClick(Sender: TObject); const MIN_CURVE = 1/50; // Huge curve MAX_CURVE = 8; // Shallow curve var c: Double; begin if ( ImageEnView1.LayersCurrent >= 0 ) and ( ImageEnView1.CurrentLayer.Kind = ielkLine) then begin c := TIELineLayer(ImageEnView1.CurrentLayer).Curve; if c = 0 then c := MAX_CURVE else if c < 0 then c := c * 1.1 else c := c * 0.9; if c > MAX_CURVE then c := 0; // Curve to shallow? Disable curve TIELineLayer(ImageEnView1.CurrentLayer).Curve := c; ImageEnView1.Update(); end; end;