Image Viewer CP ActiveX Control

DrawLine

 

Draw a line that connects two points on image.

Public Function DrawLine( _
   ByVal iLeft1 As Integer, _
   ByVal iTop1 As Integer, _
   ByVal iLeft2 As Integer, _
   ByVal iTop2 As Integer, _
   ByVal iPenWidth As Integer, _
   ByVal iDashStyle As Integer, _
   ByVal clrColor As Color, _
   ByVal iAlpha As Integer, _
   ByVal bAntiAlias As Bool
) 

 

Parameter

iLeft1
  Specifies the x-coordinate of the starting point of the line.

iTop
   Specifies the y-coordinate of the starting point of the line.

iLeft2
  Specifies the x-coordinate of the ending point of the line.

iTop2
  Specifies the y-coordinate of the ending point of the line.

iPenWidth
   Specifies the width in pixel of the pen used to draw the line.

iDashStyle
   Specifies the dash style of the pen.
   0-Specifies a solid line.
   1-Specifies a dashed line.
   2-Specifies a dotted line.
   3-Specifies an alternating dash-dot line.
   4-Specifies an alternating dash-dot-dot line.

clrColor
   Specifies the color of the line.

iAlpha
   Specifies the alpha value of the ellipse color. The range from 0-255. 255 is fully visible.

bAntiAlias
   true - enable Anti-Aliasing algorithm, false - disable Anti-Aliasing algorithm.

Return Value

No return value.


Example

   

Visual Basic Syntax
ImageViewer1.DrawLine 0, 0, 400, 200, 5, 2, RGB(255, 0, 0), 255, True