drawRoundRectangle
drawRoundRectangle(x1: Integer; y1: Integer; x2: Integer; y2: Integer; xRoundSize: Integer; yRoundSize: Integer; color: Integer);
The drawRoundRectangle method of the Printer class draws a rectangle with rounded corners on the printer page, by using a colored pen the width of the drawWidth property and the style of the drawStyle property. The figure is filled by using the drawFillColor and drawFillStyle properties of the object.
An exception is raised if this method is invoked from a server method.
If the width or the height of the rectangle is zero (0), the rectangle is not drawn. As the figure drawn by this function extends up to but does not include the right and bottom coordinate, the height of the figure is y2 through y1 and the width is x2 through x1. The width and the height of a rectangle must be in the range 2 units through 32,767 units.
The drawRoundRectangle method parameters are listed in the following table.
Parameter | Description |
---|---|
x1, y1 | Left and top points of the rectangle |
x2, y2 | Right and bottom points of the rectangle |
xRoundSize | Width of ellipse for rounded corners |
yRoundSize | Height of ellipse for rounded corners |
color | Color of the pen used |
All of the position values are relative to the left and top margins, and need not lie within the page.
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.