Package ilcd
Class Draw

Public Method drawRectangle

static void drawRectangle(int mode, int width, int height)

Throws:

_INSERT_METHOD_SIGNATURE_HERE_

Description:

Parameter Range Description
mode Bit 0 ... 7 flags for the rectangle properties
width 1 ... display width width of the rectangle
height 1 ... display height height of the rectangle

Draws a rectangle starting from the current cursor position to the ending point specified via width and height. The parameter mode allows to set several properties for the rectangle:

mode
RECTANGLE_ROUNDED_CORNERS
RECTANGLE_DROP_SHADOW
RECTANGLE_SOUROUNDED_WITH_BACKGROUND_COLOR
RECTANGLE_FILLED_WITH_BACKGROUND_COLOR
RECTANGLE_USE_FOREGROUND_COLOR_FOR_FILLING (bit 3 must be set too)
RECTANGLE_FILLED_WITH_CURRENT_FILL_PATTERN (bits 3 and 4 ignored if set)
RECTANGLE_DRAW_WITHOUT_FRAME
RECTANGLE_ALPHA_BLENDING_FOR_SHADOW_ONLY

Note

Example

Draw.drawRectangle(Draw.RECTANGLE_ROUNDED_CORNERS |
                   Draw.RECTANGLE_DROP_SHADOW,
                   50, 30);

Draws a rectangle with a width of 50 pixels and a height of 30 pixels at the actual cursor position. Moreover, the rectangle has rounded corners and a drop shadow.

See also:

Draw.drawCircle(int)
Draw.drawStyledCircle(int, int)
Control.getCursorPosition()
Attribute.setInverseMode(boolean)
Attribute.setLineStyle(int)
Attribute.setBorderColor(int)
Attribute.setBorderShadowColor(int)
Attribute.setLineThickness(int)
Attribute.setLineCapsStyle(int)
Attribute.setFillingColor(int)
Attribute.setFillingGradient(int, int, int, int)
Attribute.setFillingTile(int)
Attribute.setAlpha(int)
Draw.eraseDisplayArea(int, int)