Line objects can be drawn /transformed by holding down the Shift key and moving the mouse.

When drawing a Line object, placing the second point determines whether the line is 0/180 degress, or 45 / 90 degrees.

For transformations, use the mouse to grab the block on the rectangle surrounding the line object and move it. If you grab the blocks at one of the corners, this will transform the line 45 degrees. If you use the mouse to grab the blocks on the sides, the Line object will be transformed by 0 or 180 degrees. If you grab the blocks on the top or bottom, the Line object transforms 90 degress.

Code Example

Creating rectangle / ellipse / rounded rectangle objects while maintaining the aspect ratio.

[When drawing the object]

Set the EditKind property to Line, determine the first point, then hold down the Shift key to determine the position of the second point.

[When transforming the object]

Select a Line object, grab one of the blocks and hold down the Shift key while moving the mouse.

(* After drawing / transforming, release the Shift key after mouse-up.)

Using code to transform a Line object

[Visual Basic.NET]

'When using Annotation function, the following property must be set to True.
ImageKit1.Edit.EditEnabled = True

[When drawing the object]
'Set required properties such as color and line thickness
     .
     .
     .

'Set the Point argument and draw the Line object
'* Example of drawing a 45 degree line
Dim drawPoints As Point() = {New Point(10, 50), New Point(110, 150)}
ImageKit1.Edit.DrawLine(drawPoints)

[When transforming the object]
'Select the object to be transformed (assuming the target object number is 3)
ImageKit1.Edit.SelectObject(3)

'Set the SelectedObjectDrawPoints property so that Point is drawn at 45 degrees
'* Example of setting the angle to 45 degrees while keeping the upper left position as it is
Dim newPoints As Point() = { ImageKit1.Edit.SelectedObjectDrawPoints(0), _
New Point(ImageKit1.Edit.SelectedObjectDrawPoints(0).X + 200, _
ImageKit1.Edit.SelectedObjectDrawPoints(0).Y + 200) }
ImageKit1.Edit.SelectedObjectDrawPoints = newPoints


[Visual C#.NET]

//When using Annotation function, the following property must be set to True.
ImageKit1.Edit.EditEnabled = true;

[When drawing the object]
//Set required properties such as color and line thickness
     .
     .
     .

//Set the Point argument and draw the Line object
//* Example of drawing a 45 degree line
Point[] newPoindrawPointsts = {new Point(10, 50), new Point(210, 250)};
ImageKit1.Edit.DrawLine(drawPoints);

[When transforming the object]
//Select the object to be transformed (assuming the target object number is 3)
ImageKit1.Edit.SelectObject(3);

//Set the SelectedObjectDrawPoints property so that Point is drawn at 45 degrees
//* Example of setting the angle to 45 degrees while keeping the upper left position as it is
Point[] newPoints = { ImageKit1.Edit.SelectedObjectDrawPoints[0],
new Point(ImageKit1.Edit.SelectedObjectDrawPoints[0].X + 200,
ImageKit1.Edit.SelectedObjectDrawPoints[0].Y + 200) };
ImageKit1.Edit.SelectedObjectDrawPoints = newPoints;

Relevant Properties

ImageKit.Edit.SelectedObjectDrawPoints

Relevant Methods

ImageKit.Edit.SelectObject
ImageKit.Edit.DrawLine

The ImageKit.NET3 is created by Newtone Corporation