public class Graphics extends Object implements GraphicsConstants, AlignmentConstants
Modifier and Type | Field and Description |
---|---|
protected int |
antiAliasOptions |
static boolean |
canAlphaBlend |
static boolean |
canCopy |
static boolean |
canMove |
static int |
CAPABILITY_CAN_DRAW_IMAGE_DISABLED |
static int |
CAPABILITY_CAN_TRANSFORM |
static int |
defaultAntiAliasOptions |
static int |
DRAW_AND
The constant for a draw operation that AND's the source with the
destination.
|
static int |
DRAW_OR
The constant for a draw operation that OR's the source with the
destination.
|
static int |
DRAW_OVER
The constant for a draw operation that draws the source over
the destination.
|
static int |
DRAW_XOR
The constant for a draw operation that XOR's the source with the
destination.
|
static Color |
LighterGray |
static int |
OPTION_ANTI_ALIAS_DRAWING |
static int |
OPTION_ANTI_ALIAS_TEXT |
static int |
OPTION_TYPE_ANTI_ALIAS |
static int |
SPECIAL_TICK |
static int |
SPECIAL_X |
All, BDR_DOTTED, BDR_INNER, BDR_NOBORDER, BDR_OUTER, BDR_OUTLINE, BDR_RAISEDINNER, BDR_RAISEDOUTER, BDR_SUNKENINNER, BDR_SUNKENOUTER, BF_BOTTOM, BF_BOTTOMLEFT, BF_BOTTOMRIGHT, BF_BUTTON, BF_DIAGONAL, BF_DIAGONAL_ENDBOTTOMLEFT, BF_DIAGONAL_ENDBOTTOMRIGHT, BF_DIAGONAL_ENDTOPLEFT, BF_DIAGONAL_ENDTOPRIGHT, BF_EXACT, BF_FLAT, BF_LEFT, BF_MIDDLE, BF_MONO, BF_PALM, BF_RECT, BF_RIGHT, BF_SOFT, BF_SQUARE, BF_TOP, BF_TOPLEFT, BF_TOPRIGHT, Down, EDGE_BUMP, EDGE_ETCHED, EDGE_RAISED, EDGE_SUNKEN, Left, Right, Up
BOTTOM, CELLFLAG, CELLMASK, CENTER, CONTROLMASK, DONTCHANGE, DONTFILL, DONTSTRETCH, EAST, FILL, GROW, HCENTER, HCONTRACT, HEXPAND, HFILL, HGROW, HSHRINK, HSTRETCH, INITIALLY_CLOSED, INITIALLY_MINIMIZED, INITIALLY_PREFERRED_SIZE, LEFT, NORTH, NORTHEAST, NORTHWEST, RIGHT, SHRINK, SOUTH, SOUTHEAST, SOUTHWEST, STRETCH, TAG_BACKGROUND_IMAGE, TAG_BORDER, TAG_FIXEDSIZE, TAG_INSETS, TAG_MAXIMUMSIZE, TAG_MINIMUMSIZE, TAG_PREFERREDSIZE, TAG_RECT, TAG_SPAN, TAG_TEXTSIZE, TOP, VCENTER, VCONTRACT, VEXPAND, VFILL, VGROW, VSHRINK, VSTRETCH, WEST
Constructor and Description |
---|
Graphics(Image image) |
Graphics(Image image,
boolean forCopying) |
Graphics(int options,
Object nativeSurface)
Do not use this constructor.
|
Graphics(WindowSurface s,
java.awt.Graphics gr) |
Modifier and Type | Method and Description |
---|---|
static void |
anchor(Rect subArea,
Rect largeArea,
int anchor)
Modify subArea so that it is anchored appropriately in largeArea.
|
boolean |
canCopyFrom()
This returns true if you can do a bitBlt() using this Graphics object as a source.
|
boolean |
canTransform()
Returns if this Graphics can do Affine Transforms.
|
static Point |
centerText(FontMetrics fm,
String st,
int width,
int height) |
void |
changeBrush(Color c,
int style) |
void |
changePen(Color c,
int style,
int thickness) |
void |
changePen(Color c,
int style,
int thickness,
float miterLimit) |
void |
clearClip() |
void |
copyRect(Graphics source,
int x,
int y,
int width,
int height,
int destX,
int destY) |
void |
copyRect(ISurface surface,
int x,
int y,
int width,
int height,
int dstX,
int dstY) |
void |
draw(ImageData im,
int x,
int y) |
void |
draw3DDiamond(Rect rect,
boolean pressed,
Color back) |
void |
draw3DDiamond(Rect rect,
boolean pressed,
Color back,
boolean amFlat) |
void |
draw3DRect(Rect r,
int style,
boolean flat,
Color fill,
Color outlineColor) |
void |
draw3DRect(Rect r,
int style,
boolean flat,
Color fill,
Color outlineColor,
int labelWidth) |
void |
drawArc(int x,
int y,
int width,
int height,
float startAngle,
float angle) |
void |
drawChar(char which,
int x,
int y,
int options) |
void |
drawDiamond(Rect r,
int which) |
void |
drawDots(int x1,
int y1,
int x2,
int y2)
Draws a dotted line at the given coordinates.
|
void |
drawEdge(Rect r,
int edge,
int flags,
int labelWidth) |
void |
drawEllipse(int x,
int y,
int width,
int height)
Draw an ellipse in the current Pen, but do not fill the inside.
|
void |
drawFormattedText(char[] s,
int start,
int length,
int x,
int y,
FormattedTextSpecs fts) |
void |
drawFormattedText(String s,
int x,
int y,
FormattedTextSpecs fts) |
void |
drawFormattedText(String s,
int start,
int length,
int x,
int y,
FormattedTextSpecs fts) |
void |
drawHorizontalTriangle(Rect bounds,
boolean left) |
void |
drawImage(IImage image,
int imageDrawOptions,
Rect dest,
int anchor) |
void |
drawImage(Image image,
int x,
int y) |
void |
drawImage(Image image,
int x,
int y,
int iimageDrawOptions) |
void |
drawImageData(ImageData source,
int drawX,
int drawY,
int drawWidth,
int drawHeight,
Rect visibleArea,
int scaleOptions)
Scale and draw an ImageData to the Graphics, specifying the destination area
that is to be drawn on the Graphics - all other sections of the image will
be clipped.
|
void |
drawImageData(ImageData im,
Rect sourceImageArea,
Rect destArea,
int scaleOptions) |
void |
drawLine(int x1,
int y1,
int x2,
int y2)
Draw a line between two points in the current pen.
|
void |
drawLines(int[] x,
int[] y,
int count) |
void |
drawLines(int[] x,
int[] y,
int xoffset,
int yoffset,
int numberOfPoints,
boolean separateLines) |
void |
drawPicture(Picture image,
int x,
int y) |
void |
drawPicture(Picture picture,
int x,
int y,
int iimageDrawOptions) |
void |
drawPolygon(int[] x,
int[] y,
int count)
Draw a polygon in the current Pen, but do not fill the inside.
|
void |
drawRect(int x,
int y,
int width,
int height)
Draw a rectangle in the current Pen, but do not fill the inside.
|
void |
drawRGB(int[] rgbData,
int offset,
int x,
int y,
int width,
int height,
int rowStride,
boolean useAlpha) |
void |
drawRoundRect(int x,
int y,
int width,
int height,
int radius)
Draw a rounded rectangle in the current Pen, but do not fill the inside.
|
void |
drawSpecial(int what,
Rect where,
Pen p,
Brush b) |
void |
drawText(char[] chars,
int start,
int count,
int x,
int y)
Draws text at the given coordinates.
|
void |
drawText(FontMetrics fm,
String[] lines,
Rect where,
int alignment) |
void |
drawText(FontMetrics fm,
String[] lines,
Rect where,
int alignment,
int anchor) |
void |
drawText(FontMetrics fm,
String[] lines,
Rect where,
int alignment,
int anchor,
int startLine,
int endLine) |
void |
drawText(FontMetrics fm,
String[] lines,
Rect where,
int alignment,
int anchor,
int startLine,
int endLine,
FormattedTextSpecs fts) |
void |
drawText(String s,
int x,
int y)
Fill in a rectangle with the current Brush, and optionally draw around it
with the current pen.
|
protected void |
drawTextIn(FontMetrics fm,
String[] lines,
Rect where,
int alignment,
int start,
int end,
FormattedTextSpecs fts) |
void |
drawVerticalTriangle(Rect bounds,
boolean up) |
void |
fillEllipse(int x,
int y,
int width,
int height)
Fill an ellipse in the current Brush but do not draw around it using the pen.
|
void |
fillPolygon(int[] x,
int[] y,
int count)
Fill a polygon in the current Brush, but do not draw the outside.
|
void |
fillRect(int x,
int y,
int width,
int height)
Fill a rectangle in the current Brush but do not draw around it using the pen.
|
void |
fillRoundRect(int x,
int y,
int width,
int height,
int radius)
Fill a rounded rectangle in the current Brush but do not draw around it using the pen.
|
protected void |
finalize()
This method (when overriden), will be called when the VM determines that the Object can be
garbage collected.
|
void |
flush() |
void |
free()
Free resources used by this Graphics.
|
protected static Object[] |
getArcPoints(int xc,
int yc,
int rx,
int ry,
float startAngle,
float endAngle,
int flags) |
static Rect |
getAverageSize(FontMetrics fm,
int rows,
int columns,
int xGap,
int yGap) |
Color |
getBackground() |
Color |
getBackground(Color dest) |
Brush |
getBrush() |
Brush |
getBrush(Brush dest) |
Rect |
getClip(Rect r)
Sets the x, y, width and height coordinates in the rectangle passed
to the current clip coordinates.
|
Color |
getColor() |
Color |
getColor(Color dest) |
static String |
getDisplayable(String s) |
Font |
getFont()
Get the current Font for the Graphics.
|
FontMetrics |
getFontMetrics(Font f) |
static double |
getGamma() |
Pen |
getPen() |
Pen |
getPen(Pen dest) |
boolean |
getRGB(int[] destRgbData,
int offset,
int x,
int y,
int width,
int height,
int rowStride) |
static Rect |
getSize(FontMetrics fm,
String[] lines,
int xGap,
int yGap) |
static void |
getSize(FontMetrics fm,
String[] lines,
int start,
int end,
Dimension d) |
static void |
getSize(FontMetrics fm,
String[] lines,
int start,
int end,
Dimension d,
FormattedTextSpecs fts) |
static void |
getSize(FontMetrics fm,
String line,
Dimension d) |
static void |
getSize(FontMetrics fm,
String line,
Dimension d,
FormattedTextSpecs fts) |
static Rect |
getSize(FontMetrics fm,
String st,
int xGap,
int yGap) |
ISurface |
getSurface() |
int |
getSurfaceType()
Get the surface type of the Graphics.
|
Point |
getTranslation() |
static int |
getUnderlined(String s) |
int |
hasCapabilities(int capabilities) |
boolean |
isCapable(int cap) |
boolean |
isValid() |
static int |
mapColor(int oldColor) |
long |
modifyOptions(int optionType,
int optionsToSet,
int optionsToClear)
Modify Graphics options.
|
void |
moveRect(int sx,
int sy,
int swidth,
int sheight,
int destX,
int destY) |
void |
old_drawText(char[] chars,
int start,
int count,
int x,
int y) |
protected void |
optionsChanged(int optionType,
int newOptionBits,
int oldOptionBits)
This is called when option bits have changed.
|
void |
paintClosedArc(int x,
int y,
int width,
int height,
float startAngle,
float angle,
boolean useBrush,
boolean usePen) |
void |
paintEllipse(int x,
int y,
int width,
int height)
Draw an ellipse in the current Pen and fill with the current Brush.
|
void |
paintEllipse(int x,
int y,
int width,
int height,
boolean useBrush,
boolean usePen) |
void |
paintPie(int x,
int y,
int width,
int height,
float startAngle,
float angle,
boolean useBrush,
boolean usePen) |
void |
paintPolygon(int[] x,
int[] y,
int count)
Fill a polygon in the current Brush, and draw the outside in the current Pen.
|
void |
paintPolygon(int[] x,
int[] y,
int xoffset,
int yoffset,
int count,
boolean useBrush,
boolean usePen) |
void |
paintRect(int x,
int y,
int width,
int height)
Draw a rectangle in the current Pen and fill with the current Brush.
|
void |
paintRect(int x,
int y,
int width,
int height,
boolean useBrush,
boolean usePen) |
void |
paintRoundRect(int x,
int y,
int width,
int height,
int radius,
boolean useBrush,
boolean usePen)
Draw a rectangle with rounded corners.
|
Rect |
reduceClip(int x,
int y,
int width,
int height,
Rect oldClip)
This alters the clipping region of the current graphics to be the intersection
of the original clipping region and the newly specified region.
|
Rect |
reduceClip(Rect newRect)
This alters the clipping region of the current graphics to be the intersection
of the original clipping region and the newly specified region.
|
void |
reset() |
void |
restoreClip(Rect r)
Use this with a Rect value returned from reduceClip()
|
void |
restoreOptions(int optionType,
long fromModifyOptions)
Restore Graphics options from a call to modifyOptions.
|
void |
restoreTransform(Object savedTxState) |
void |
set(Brush b)
Set the brush without creating or returning a new Brush object.
|
void |
set(Pen p)
Set the pen without creating or returning a new Pen object.
|
void |
setBackground(Color c) |
Color |
setBackground(Color bk,
Color oldBk) |
void |
setBackground(int r,
int g,
int b) |
Brush |
setBrush(Brush b) |
Brush |
setBrush(Brush b,
Brush oldBrush) |
void |
setClip(int x,
int y,
int width,
int height) |
void |
setColor(Color c) |
Color |
setColor(Color c,
Color oldColor) |
void |
setColor(int r,
int g,
int b) |
void |
setDrawOp(int drawOp) |
void |
setFont(Font f)
Set the current Font of the Graphics.
|
void |
setForeground(Color c)
The Foreground color is not the current drawing color, but
merely an indication on what the preferred foreground color currently
is for this Graphics.
|
void |
setForeground(int r,
int g,
int b)
The Foreground color is not the current drawing color, but
merely an indication on what the preferred foreground color currently
is for this Graphics.
|
static void |
setGamma(double gamma) |
Pen |
setPen(Pen p) |
Pen |
setPen(Pen p,
Pen oldPen) |
Object |
setTransform(double em11,
double em12,
double em21,
double em22,
double edx,
double edy) |
Object |
transform(double em11,
double em12,
double em21,
double em22,
double edx,
double edy) |
void |
translate(int x,
int y)
Translates the origin of the current coordinate system by the given
x and y values.
|
void |
underline(Object fontOrFontMetrics,
char[] text,
int start,
int length,
int underlineStartIndex,
int x,
int y)
Call this after you have called drawText().
|
public static final int CAPABILITY_CAN_TRANSFORM
public static final int CAPABILITY_CAN_DRAW_IMAGE_DISABLED
public static final int OPTION_ANTI_ALIAS_TEXT
public static final int OPTION_ANTI_ALIAS_DRAWING
public static final int OPTION_TYPE_ANTI_ALIAS
public static int defaultAntiAliasOptions
protected int antiAliasOptions
public static boolean canAlphaBlend
public static boolean canCopy
public static boolean canMove
public static final int DRAW_OVER
public static final int DRAW_AND
public static final int DRAW_OR
public static final int DRAW_XOR
public static Color LighterGray
public static final int SPECIAL_TICK
public static final int SPECIAL_X
public Graphics(int options, Object nativeSurface)
public Graphics(Image image)
public Graphics(Image image, boolean forCopying)
public Graphics(WindowSurface s, java.awt.Graphics gr)
public final boolean isCapable(int cap)
public int hasCapabilities(int capabilities)
public void drawImage(Image image, int x, int y, int iimageDrawOptions)
public void drawPicture(Picture picture, int x, int y, int iimageDrawOptions)
protected void optionsChanged(int optionType, int newOptionBits, int oldOptionBits)
optionType
- one of the OPTION_TYPE_XXX values.newOptionBits
- the new option bits.oldOptionBits
- the old option bits.public long modifyOptions(int optionType, int optionsToSet, int optionsToClear)
optionType
- one of the OPTION_TYPE_XXX values.optionsToSet
- option bits to set.optionsToClear
- option bits to clear.public void restoreOptions(int optionType, long fromModifyOptions)
optionType
- one of the OPTION_TYPE_XXX values.fromModifyOptions
- the value returned by modifyOptions().public ISurface getSurface()
public boolean isValid()
public static void setGamma(double gamma)
public static double getGamma()
public void flush()
public void setClip(int x, int y, int width, int height)
public Rect getClip(Rect r)
public void clearClip()
public boolean canTransform()
public Object setTransform(double em11, double em12, double em21, double em22, double edx, double edy)
public Object transform(double em11, double em12, double em21, double em22, double edx, double edy)
public void restoreTransform(Object savedTxState)
public void paintRect(int x, int y, int width, int height, boolean useBrush, boolean usePen)
public void paintPolygon(int[] x, int[] y, int xoffset, int yoffset, int count, boolean useBrush, boolean usePen)
public void drawLine(int x1, int y1, int x2, int y2)
x1
- The starting x-coordinate.y1
- The starting y-coordinate.x2
- The ending x-coordinate.y2
- The ending y-coordinate.public void translate(int x, int y)
public Point getTranslation()
public void old_drawText(char[] chars, int start, int count, int x, int y)
public void drawText(char[] chars, int start, int count, int x, int y)
public void copyRect(Graphics source, int x, int y, int width, int height, int destX, int destY)
public void drawImage(Image image, int x, int y)
public void drawPicture(Picture image, int x, int y)
public void draw(ImageData im, int x, int y)
public void drawImageData(ImageData im, Rect sourceImageArea, Rect destArea, int scaleOptions)
public void drawImageData(ImageData source, int drawX, int drawY, int drawWidth, int drawHeight, Rect visibleArea, int scaleOptions)
src
- the source ImageDatadrawX
- the x location where the top left location of the ImageData would be
if the entire image was drawn.drawY
- the y location where the top left location of the ImageData would be
if the entire image was drawn.drawWidth
- the full width of the scaled image.drawHeight
- the full heigh of the scaled image.visibleArea
- the destination area being updated on the Graphics.scaleOptions
- scale options.public void drawRGB(int[] rgbData, int offset, int x, int y, int width, int height, int rowStride, boolean useAlpha)
public boolean getRGB(int[] destRgbData, int offset, int x, int y, int width, int height, int rowStride)
public static int mapColor(int oldColor)
public void paintEllipse(int x, int y, int width, int height, boolean useBrush, boolean usePen)
public void moveRect(int sx, int sy, int swidth, int sheight, int destX, int destY)
public int getSurfaceType()
public boolean canCopyFrom()
public void setDrawOp(int drawOp)
public Pen getPen()
public Brush getBrush()
public void set(Pen p)
p
- the new value of the pen. This can be null.public void set(Brush b)
b
- the new value of the brush. This can be null.public void setColor(int r, int g, int b)
public void setColor(Color c)
public void setForeground(Color c)
public void setForeground(int r, int g, int b)
public void setBackground(Color c)
public void setBackground(int r, int g, int b)
public Color getColor()
public Color getBackground()
public void free()
protected void finalize() throws Throwable
Object
The finalize() method of a Class is only called if it overrides finalize() - the finalize() method java.lang.Object is never called by the Eve VM.
public void setFont(Font f)
f
- the Font to set.public Font getFont()
public void drawDots(int x1, int y1, int x2, int y2)
public void drawRect(int x, int y, int width, int height)
x
- The x position of the rectangle.y
- The y position of the rectangle.width
- The width of the rectangle.height
- The height of the rectangle.public void fillRect(int x, int y, int width, int height)
x
- The x position of the rectangle.y
- The y position of the rectangle.width
- The width of the rectangle.height
- The height of the rectangle.public void paintRect(int x, int y, int width, int height)
x
- The x position of the rectangle.y
- The y position of the rectangle.width
- The width of the rectangle.height
- The height of the rectangle.public void drawPolygon(int[] x, int[] y, int count)
x
- The x positions of the polygon. Do not repeat the first point.y
- The y positions of the polygon. Do not repeat the first point.count
- The number of points in the polygon.public void fillPolygon(int[] x, int[] y, int count)
x
- The x positions of the polygon. Do not repeat the first point.y
- The y positions of the polygon. Do not repeat the first point.count
- The number of points in the polygon.public void paintPolygon(int[] x, int[] y, int count)
x
- The x positions of the polygon. Do not repeat the first point.y
- The y positions of the polygon. Do not repeat the first point.count
- The number of points in the polygon.public void drawEllipse(int x, int y, int width, int height)
x
- The x position of the rectangle.y
- The y position of the rectangle.width
- The width of the rectangle.height
- The height of the rectangle.public void fillEllipse(int x, int y, int width, int height)
x
- The x position of the rectangle.y
- The y position of the rectangle.width
- The width of the rectangle.height
- The height of the rectangle.public void paintEllipse(int x, int y, int width, int height)
x
- The x position of the rectangle.y
- The y position of the rectangle.width
- The width of the rectangle.height
- The height of the rectangle.public void drawText(String s, int x, int y)
x
- The x position of the rectangle.y
- The y position of the rectangle.width
- The width of the rectangle.height
- The height of the rectangle.usePen
- If this is false the pen will not be applied to the outline of the rectangle.public void drawEdge(Rect r, int edge, int flags, int labelWidth)
public void changePen(Color c, int style, int thickness)
public void changePen(Color c, int style, int thickness, float miterLimit)
public void changeBrush(Color c, int style)
public Rect reduceClip(int x, int y, int width, int height, Rect oldClip)
x
- The x coordinate of the new clipping region.y
- The y coordinate of the new clipping region.width
- The width of the new clipping region.height
- The height of the new clipping region.oldClip
- An optional Rect to hold the old clip region.public Rect reduceClip(Rect newRect)
public void restoreClip(Rect r)
public void drawLines(int[] x, int[] y, int xoffset, int yoffset, int numberOfPoints, boolean separateLines)
public void draw3DRect(Rect r, int style, boolean flat, Color fill, Color outlineColor, int labelWidth)
protected static Object[] getArcPoints(int xc, int yc, int rx, int ry, float startAngle, float endAngle, int flags)
public void drawLines(int[] x, int[] y, int count)
public void drawArc(int x, int y, int width, int height, float startAngle, float angle)
public void paintClosedArc(int x, int y, int width, int height, float startAngle, float angle, boolean useBrush, boolean usePen)
public void paintPie(int x, int y, int width, int height, float startAngle, float angle, boolean useBrush, boolean usePen)
public FontMetrics getFontMetrics(Font f)
public static int getUnderlined(String s)
public void underline(Object fontOrFontMetrics, char[] text, int start, int length, int underlineStartIndex, int x, int y)
public void drawText(FontMetrics fm, String[] lines, Rect where, int alignment)
public static Rect getSize(FontMetrics fm, String st, int xGap, int yGap)
public static Rect getSize(FontMetrics fm, String[] lines, int xGap, int yGap)
public static Rect getAverageSize(FontMetrics fm, int rows, int columns, int xGap, int yGap)
public static Point centerText(FontMetrics fm, String st, int width, int height)
public static void getSize(FontMetrics fm, String line, Dimension d)
public static void getSize(FontMetrics fm, String line, Dimension d, FormattedTextSpecs fts)
public static void getSize(FontMetrics fm, String[] lines, int start, int end, Dimension d)
public static void getSize(FontMetrics fm, String[] lines, int start, int end, Dimension d, FormattedTextSpecs fts)
public static void anchor(Rect subArea, Rect largeArea, int anchor)
public void drawText(FontMetrics fm, String[] lines, Rect where, int alignment, int anchor)
public void drawText(FontMetrics fm, String[] lines, Rect where, int alignment, int anchor, int startLine, int endLine)
public void drawText(FontMetrics fm, String[] lines, Rect where, int alignment, int anchor, int startLine, int endLine, FormattedTextSpecs fts)
protected void drawTextIn(FontMetrics fm, String[] lines, Rect where, int alignment, int start, int end, FormattedTextSpecs fts)
public void drawVerticalTriangle(Rect bounds, boolean up)
public void drawHorizontalTriangle(Rect bounds, boolean left)
public void drawDiamond(Rect r, int which)
public void drawFormattedText(String s, int x, int y, FormattedTextSpecs fts)
public void drawFormattedText(String s, int start, int length, int x, int y, FormattedTextSpecs fts)
public void drawFormattedText(char[] s, int start, int length, int x, int y, FormattedTextSpecs fts)
public void drawChar(char which, int x, int y, int options)
public void reset()
public void copyRect(ISurface surface, int x, int y, int width, int height, int dstX, int dstY)
public void paintRoundRect(int x, int y, int width, int height, int radius, boolean useBrush, boolean usePen)
radius
- the radius of the arcs that are at the corners.public void drawRoundRect(int x, int y, int width, int height, int radius)
x
- The x position of the rectangle.y
- The y position of the rectangle.width
- The width of the rectangle.height
- The height of the rectangle.radius
- the radius of the arcs that are at the corners.public void fillRoundRect(int x, int y, int width, int height, int radius)
x
- The x position of the rectangle.y
- The y position of the rectangle.width
- The width of the rectangle.height
- The height of the rectangle.radius
- the radius of the arcs that are at the corners.