public static class TLspFillStyle.StipplePattern.Builder extends Object
Modifier and Type | Method and Description |
---|---|
TLspFillStyle.StipplePattern |
build()
Finishes building and returns the stipple pattern corresponding to the
properties configured on this builder.
|
TLspFillStyle.StipplePattern.Builder |
drawLine(int aX1,
int aY1,
int aX2,
int aY2)
Draws a line in this stipple pattern from the given starting point to the given end point.
|
TLspFillStyle.StipplePattern.Builder |
drawOval(int aX,
int aY,
int aWidth,
int aHeight)
Draws an oval in this stipple pattern with the given top-left corner location, width and height
The coordinates are image coordinates of the stipple pattern, so should be in the range from
0 to and including 31.
|
TLspFillStyle.StipplePattern.Builder |
drawPolygon(int[] aXPoints,
int[] aYPoints,
int aNPoints)
Draws a polygon in this stipple pattern with the given point locations
The coordinates are image coordinates of the stipple pattern, so should be in the range from
0 to and including 31.
|
TLspFillStyle.StipplePattern.Builder |
drawRect(int aX,
int aY,
int aWidth,
int aHeight)
Draws a rectangle in this stipple pattern with the given top left corner location, width and height
The coordinates are image coordinates of the stipple pattern, so should be in the range from
0 to and including 31.
|
TLspFillStyle.StipplePattern.Builder |
fillOval(int aX,
int aY,
int aWidth,
int aHeight)
Draws a filled oval in this stipple pattern with the given top-left corner location, width and height
The coordinates are image coordinates of the stipple pattern, so should be in the range from
0 to and including 31.
|
TLspFillStyle.StipplePattern.Builder |
fillPolygon(int[] aXPoints,
int[] aYPoints,
int aNPoints)
Draws a filled polygon in this stipple pattern with the given point locations
The coordinates are image coordinates of the stipple pattern, so should be in the range from
0 to and including 31.
|
TLspFillStyle.StipplePattern.Builder |
fillRect(int aX,
int aY,
int aWidth,
int aHeight)
Draws a filled rectangle in this stipple pattern with the given top left corner location, width and height
The coordinates are image coordinates of the stipple pattern, so should be in the range from
0 to and including 31.
|
TLspFillStyle.StipplePattern.Builder |
setStipplePattern(byte[] aStipplePattern)
Sets a new stipple pattern defined by the given byte array.
|
public TLspFillStyle.StipplePattern.Builder setStipplePattern(byte[] aStipplePattern)
32 bits * 32 bits = 1024 bits = 128 bytes
),
where each 4 bytes represent a row of the bit pattern (4 bytes = 32 bits
).aStipplePattern
- the stipple patternIllegalArgumentException
- if aStipplePattern == null || aStipplePattern.length != 128
public TLspFillStyle.StipplePattern.Builder drawLine(int aX1, int aY1, int aX2, int aY2)
aX1
- the x-coordinate of the starting point in the range [0..31]aY1
- the y-coordinate of the starting point in the range [0..31]aX2
- the x-coordinate of the end pointaY2
- the y-coordinate of the end-pointpublic TLspFillStyle.StipplePattern.Builder drawOval(int aX, int aY, int aWidth, int aHeight)
aX
- the x-coordinate of the top-left corner of the oval in the range [0..31]aY
- the y-coordinate of the top-left corner of the oval in the range [0..31]aWidth
- the width of the ovalaHeight
- the height of the ovalpublic TLspFillStyle.StipplePattern.Builder fillOval(int aX, int aY, int aWidth, int aHeight)
aX
- the x-coordinate of the top-left corner of the oval in the range [0..31]aY
- the y-coordinate of the top-left corner of the oval in the range [0..31]aWidth
- the width of the oval in the range [1..32]aHeight
- the height of the oval in the range [1..32]public TLspFillStyle.StipplePattern.Builder drawRect(int aX, int aY, int aWidth, int aHeight)
aX
- the x-coordinate of the top-left corner of the rectangle in the range [0..31]aY
- the y-coordinate of the top-left corner of the rectangle in the range [0..31]aWidth
- the width of the rectangle in the range [1..32]aHeight
- the height of the rectangle in the range [1..32]public TLspFillStyle.StipplePattern.Builder fillRect(int aX, int aY, int aWidth, int aHeight)
aX
- the x-coordinate of the top-left corner of the rectangle in the range [0..31]aY
- the y-coordinate of the top-left corner of the rectangle in the range [0..31]aWidth
- the width of the rectangle in the range [1..32]aHeight
- the height of the rectangle in the range [1..32]public TLspFillStyle.StipplePattern.Builder drawPolygon(int[] aXPoints, int[] aYPoints, int aNPoints)
aXPoints
- the x-coordinates of the points of the polygon in the range [0..31]aYPoints
- the y-coordinates of the points of the polygon in the range [0..31]aNPoints
- the number of points of the polygonpublic TLspFillStyle.StipplePattern.Builder fillPolygon(int[] aXPoints, int[] aYPoints, int aNPoints)
aXPoints
- the x-coordinates of the points of the polygonaYPoints
- the y-coordinates of the points of the polygonaNPoints
- the number of points of the polygonpublic TLspFillStyle.StipplePattern build()