public class FillPaint extends Object
Serializable
, unlike most Paint objects.Modifier and Type | Method and Description |
---|---|
static Paint |
checkerboard(int n,
Color colorA,
Color colorB)
Returns a checkerboard pattern.
|
static Paint |
crosshatch(int n,
int p,
Color colorBackground,
Color colorLine)
Returns a horizonal and vertical crosshatch pattern.
|
static Paint |
diagonal(int n,
Color colorA,
Color colorB)
Returns a diagonal pattern.
|
static Paint |
diamond(int n,
int p,
Color colorBackground,
Color colorLine)
Returns a diamond pattern (a checkerboard rotated 45 degrees).
|
static Paint |
diamondHatch(int n,
int p,
Color colorBackground,
Color colorLine)
Returns a crosshatch on a 45 degree angle.
|
static Paint |
dot(int n,
int r,
Color colorBackground,
Color colorCircle)
Returns a pattern that is an array of circles.
|
static Paint |
horizontalStripe(int n,
int p,
Color colorBackground,
Color colorLine)
Returns a horizontally striped pattern.
|
static Paint |
image(ImageIcon imageIcon)
Returns a tiling of an image.
|
static Paint |
verticalStripe(int n,
int p,
Color colorBackground,
Color colorLine)
Returns a vertically striped pattern.
|
public static Paint checkerboard(int n, Color colorA, Color colorB)
n
- is the size of the pattern in pixels.colorA
- is one of the colors.colorB
- is the other color.public static Paint crosshatch(int n, int p, Color colorBackground, Color colorLine)
n
- is the size of the pattern in pixels.p
- is the number of pixels between the vertical lines.colorBackground
- is the background color.colorLine
- is the line color.public static Paint diagonal(int n, Color colorA, Color colorB)
n
- is the size of the pattern in pixels.colorA
- is one of the colors.colorB
- is the other color.public static Paint diamond(int n, int p, Color colorBackground, Color colorLine)
n
- is the size of the pattern in pixels.p
- is the thickness of the line.colorBackground
- is the color of the background.colorLine
- is the color of the line.public static Paint diamondHatch(int n, int p, Color colorBackground, Color colorLine)
n
- is the size of the pattern in pixels.p
- is the number of pixels between the vertical lines.colorBackground
- is the background color.colorLine
- is the line color.public static Paint dot(int n, int r, Color colorBackground, Color colorCircle)
n
- is the size of the pattern in pixels.r
- is the radius, in pixels, of the circles in the pattern.colorBackground
- is the background color.colorCircle
- is the color of the circles.public static Paint horizontalStripe(int n, int p, Color colorBackground, Color colorLine)
n
- is the size of the pattern in pixels.p
- is the number of pixels between the vertical lines.colorBackground
- is the background color.colorLine
- is the line color.public static Paint image(ImageIcon imageIcon)
imageIcon
- is the image to be tiled.public static Paint verticalStripe(int n, int p, Color colorBackground, Color colorLine)
n
- is the size of the pattern in pixels.p
- is the number of pixels between the vertical lines.colorBackground
- is the background color.colorLine
- is the line color.Copyright © 1970-2015 Rogue Wave Software
Built October 13 2015.