Image Viewer CP ActiveX Control

DrawRectangle

 

Draw a rectangle on image

Public Function DrawRectangle( _
   ByVal iLeft As Integer, _
   ByVal iTop As Integer, _
   ByVal iWidth As Integer, _
   ByVal iHeight As Integer, _
   ByVal iPenWidth As Integer, _
   ByVal iDashStyle As Integer, _
   ByVal clrColor As Color, _
   ByVal iAlpha As Integer, _
   ByVal bAntiAlias As Bool
) 

 

Parameter

iLeft
   Specifies the x-coordinate of the upper-left corner of the rectangle.

iTop
   Specifies the y-coordinate of the upper-left corner of the rectangle.

iWidth
   Specifies the width of the rectangle.

iHeight
   Specifies the height of the rectangle.

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

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 rectangle.

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.DrawRectangle 80, 120, 60, 60, 10, 0, RGB(0, 255, 0), 255, True