drawArc
drawArc(x1: Integer; y1: integer; x2: Integer; y2: Integer; startX: Integer; startY: Integer; endX: Integer; endY: Integer; color: Integer);
The drawArc method of the Printer class draws an elliptical arc on the printer page, by using a pen the width of the drawWidth property value and the style of the drawStyle property. An exception is raised if this method is invoked from a server method. The drawArc method parameters are listed in the following table.
Parameter | Description |
---|---|
x1, y1, x2, y2 | Rectangle bounding the ellipse of which the arc is a part |
startX, startY | Logical x and y (horizontal and vertical) coordinate of the point that defines the starting point of the arc |
endX, endY | Logical x and y coordinate of the point that defines the end point of the arc |
color | Color of the pen used |
All of the positional values are relative to the left and top margins, and need not lie within the page. The startX, startY, endX, and endY parameter points do not need to lie exactly on the arc.
The starting point of the arc is the point at which a ray drawn from the center of the bounding rectangle through the specified starting point intersects the ellipse. The end point of the arc is the point at which a ray drawn from the center of the bounding rectangle through the specified end point intersects the ellipse. As an arc is not a closed figure, it is not filled.
The width and height of a rectangle must each be in the range 2 units through 32,767 units.
This method causes the header frame to be printed if the method is called at the start of a new page. The method has no subsequent affect on the current print position.
For details about placing output directly on a printer page at any location without the use of frames and drawing rotated text and characters, see "Free-Format Printing", later in this chapter.