PlotDraw
Constructs drawings on your plot. Use the coordinates (X1,Y1) and (X2,Y2) to define a point, line, rectangle, square, circle, or ellipse. You can specify the style, color, and width of the pen, and a fill color for a box or circular shape.
you need to call the PlotOpen() function first, to get the handle for the plot (hPlot) and to specify the output device.
Syntax
PlotDraw(hPlot, Type, PenStyle, PenCol, PenWidth, nFill, X1, Y1, X2, Y2)
hPlot:
The plot handle, returned from the PlotOpen() function. The plot handle identifies the table where data on the plot is stored.
Type:
The type of drawing:
1 - Rectangle or square
2 - Circle or ellipse
3 - Line
4 - Point
PenStyle:
The style of the pen used to draw:
0 - Solid
1 - Dash ( - - - - - )
2 - Dot (...............................)
3 - Dash and dot ( - . - . - . - . - )
4 - Dash, dot, dot ( - . . - . . - . . - )
5 - Hollow
PenCol:
The color of the pen (flashing color is not supported). Select a color from the list of Predefined Color Names and Codes or create an RGB-based color using the function MakeCitectColor.
PenWidth:
Pen width in pixels. If the width is thicker than one pixel, you need to use a solid pen (PenStyle = 0). Maximum width is 32.
nFill:
The fill color of the rectangle, square, circle, or ellipse (flashing color is not supported). Select a color from the list of predefined color names and codes or create an RGB-based color using the function MakeCitectColor. For a point or line, nFill is ignored.
X1, Y1:
X and y coordinates (in pixels) of the upper-left corner of the drawing (the origin).
X2, Y2:
X and y coordinates (in pixels) of the lower-right corner of the drawing.
For a point, (X1,Y1) and (X2,Y2) are assumed to be the same, so (X2,Y2) is ignored. To draw a circle or ellipse, enter the coordinates for a square or rectangle; the circle or ellipse is automatically drawn within the box.
If the plot is for display on the screen, coordinates are relative to the AN specified in the PlotOpen() function. If the output device is a printer, coordinates are relative to the point (0,0).
Return Value
0 (zero) if successful, otherwise an error is returned.
Related Functions
PlotClose, PlotGrid, PlotInfo, PlotLine, PlotMarker, PlotOpen, PlotScaleMarker, PlotText, PlotXYLine, TrnPlot
Example
See PlotOpen.
See Also