This method draws a polyline in the designated object.
Parameters
Name | Explanation |
---|---|
DeviceValue | The device context or the raster image data (i.e. Hdc or ImageHandle) depending on the DeviceMode |
x,y | An array of x and y coordinate values defining
points of the polyline
(1)In Visual C++, pass the pointer to the first element in the x and y arrays (2)In Visual Basic, Dim x(0 To 2) As Integer then set x(0) |
Points | The number of points defining the polyline (2 or more) |
DeviceMode | If 0 (ikScreen), then the polyline will be drawn in pixel units. If 1 (ikPrinter), the polyline will be drawn in 0.1mm units. If 2 (ikMemoryHandle), the polyline will be drawn (in pixel units) to the image data according to the DeviceValue parameter |
In Visual Basic the following constants can be used: (ikScreen = 0, ikPrinter = 1, ikMemoryHandle = 2).
Return Value
Returns True (nonzero) if successful. Returns False (0) if unsuccessful.
Explanation
The Polyline method draws a polyline in the designated object. This method draws a straight line from a designated point to another point and from there to subsequent points. Unlike the polygon, the polyline is not closed. The points are specified by the x and y parameter arrays. The polyline is drawn from the value set in the PenStyle property. This method can draw in the following designated objects: screen, printer, and image data. When drawing a polyline, it is recommended that the PenWidth, PenMode, PenColor, Transparent, and BackColor properties also be set. The BackColor property is enabled when the Transparent property is False and the pen is set to draw lines other than solid lines.
For scripting languages and other programs that require variant types, please refer to the PolylineVariant method.
If the DeviceMode parameter is 0 or 2 then x and y parameters are in pixel units.
If the DeviceMode parameter is 1 then x and y parameters are in 0.1mm units.