Declaration
property LineLength: Integer;
Description
Provides an alternative way to set the size of the line (other than setting the rectangle via
Width and
Height).
Comparison
TIELineLayer provides three ways to position the line depending on your requirements. All the following create a 45 deg. line from 100,100 to 300,300
1. Standard TIELayer methods
ImageEnView1.CurrentLayer.PosX := 100;
ImageEnView1.CurrentLayer.PosY := 100;
ImageEnView1.CurrentLayer.Width := 200;
ImageEnView1.CurrentLayer.Height := 200;
2. Setting starting and end points
TIELineLayer( ImageEnView1.CurrentLayer ).LinePoint1 := Point( 100, 100 );
TIELineLayer( ImageEnView1.CurrentLayer ).LinePoint2 := Point( 300, 300 );
2. Setting line length
TIELineLayer( ImageEnView1.CurrentLayer ).AutoSize := False;
ImageEnView1.CurrentLayer.PosX := 100;
ImageEnView1.CurrentLayer.PosY := 100;
ImageEnView1.CurrentLayer.Rotate := -45;
TIELineLayer( ImageEnView1.CurrentLayer ).LineLength := 280;// Create a layer 100 pixels long at 45 degrees
ImageEnView1.LayersAdd( ielkLine );
TIELineLayer( ImageEnView1.CurrentLayer ).LineLength := 100;
TIELineLayer( ImageEnView1.CurrentLayer ).Rotate := 45;
ImageEnView1.Update();
See Also
◼LinePoint1◼LinePoint2