public class PathBufferS8 extends PathBufferBase
vg_lite_path
in S8 format.
See Section 2.4 Vector Path Data Opcodes
of VGLite® Graphics API v2.07
.
CMD_CLOSE, CMD_CUBIC, CMD_CUBIC_REL, CMD_LINE, CMD_LINE_REL, CMD_MOVE, CMD_QUAD, CMD_QUAD_REL
Constructor and Description |
---|
PathBufferS8() |
Modifier and Type | Method and Description |
---|---|
protected void |
command(int cmd)
Adds a command with zero points in the path data
|
protected void |
command(int cmd,
byte x,
byte y)
Adds a command with 1 point parameter in the path data
|
protected void |
command(int cmd,
byte x1,
byte y1,
byte x2,
byte y2)
Adds a command with 2 points parameter in the path data
|
protected void |
command(int cmd,
byte x1,
byte y1,
byte x2,
byte y2,
byte x3,
byte y3)
Adds a command with 3 points parameter in the path data
|
void |
cubic(byte cx1,
byte cy1,
byte cx2,
byte cy2,
byte x,
byte y)
Add a cubic curve from the current point to the given point
A cubic curve is drawn from a starting point (current point) to an ending point (x, y) using two control point
(cx1, cy1) and (cx2, cy2).
|
void |
cubicRel(byte cx1,
byte cy1,
byte cx2,
byte cy2,
byte x,
byte y)
Add a cubic curve from the current point to the given point
A cubic curve is drawn from a starting point (current point) to an ending point (x, y) using two control point
(cx1, cy1) and (cx2, cy2).
|
int |
getFormat() |
protected int |
getUnitSize() |
void |
line(byte x,
byte y)
Add a line command from the current point to the given point
A line is drawn from a starting point (current point) to an ending point (c, y).
|
void |
lineRel(byte x,
byte y)
Add a line command from the current point to the given point
A line is drawn from a starting point (current point) to an ending point (c, y).
|
void |
move(byte x,
byte y)
Add a move command to the given point.
|
void |
moveRel(byte x,
byte y)
Add a move command to the given point.
|
void |
quad(byte cx,
byte cy,
byte x,
byte y)
Add a quadratic curve from the current point to the given point
A quadratic curve is drawn from a starting point (current point) to an ending point (x, y) using one control
point (cx, cy).
|
void |
quadRel(byte cx,
byte cy,
byte x,
byte y)
Add a quadratic curve from the current point to the given point
A quadratic curve is drawn from a starting point (current point) to an ending point (x, y) using one control
point (cx, cy).
|
void |
setOffset(byte x,
byte y)
Sets an offset that will be used during drawing.
|
close, extend, extend, isClosed, reset, toVGLitePath, updateVGLitePath
protected int getUnitSize()
getUnitSize
in class PathBufferBase
public int getFormat()
getFormat
in class PathBufferBase
protected void command(int cmd)
PathBufferBase
command
in class PathBufferBase
cmd
- the command to add in the path dataprotected void command(int cmd, byte x, byte y)
cmd
- the command to add in the path datax
- the horizontal coordinate of the point parametery
- the vertical coordinate of the point parameterprotected void command(int cmd, byte x1, byte y1, byte x2, byte y2)
cmd
- the command to add in the path datax1
- the horizontal coordinate of the first point parametery1
- the vertical coordinate of the first point parameterx2
- the horizontal coordinate of the second point parametery2
- the vertical coordinate of the second point parameterprotected void command(int cmd, byte x1, byte y1, byte x2, byte y2, byte x3, byte y3)
cmd
- the command to add in the path datax1
- the horizontal coordinate of the first point parametery1
- the vertical coordinate of the first point parameterx2
- the horizontal coordinate of the second point parametery2
- the vertical coordinate of the second point parameterx3
- the horizontal coordinate of the third point parametery3
- the vertical coordinate of the third point parameterpublic void setOffset(byte x, byte y)
x
- The horizontal offsety
- The vertical offsetpublic void move(byte x, byte y)
x
- the horizontal coordinate of the point to move toy
- the vertical coordinate of the point to move topublic void moveRel(byte x, byte y)
x
- the horizontal coordinate of the point to move toy
- the vertical coordinate of the point to move topublic void line(byte x, byte y)
x
- the horizontal coordinate of the end of the liney
- the vertical coordinate of the end of the linepublic void lineRel(byte x, byte y)
x
- the horizontal coordinate of the end of the line relative to the current pointy
- the vertical coordinate of the end of the line relative to the current pointpublic void quad(byte cx, byte cy, byte x, byte y)
cx
- the horizontal coordinate of the control pointcy
- the vertical coordinate of the control pointx
- the horizontal coordinate of the end of the curvey
- the vertical coordinate of the end of the curvepublic void quadRel(byte cx, byte cy, byte x, byte y)
cx
- the horizontal coordinate of the control point relative to the current pointcy
- the vertical coordinate of the control point relative to the current pointx
- the horizontal coordinate of the end of the curve relative to the current pointy
- the vertical coordinate of the end of the curve relative to the current pointpublic void cubic(byte cx1, byte cy1, byte cx2, byte cy2, byte x, byte y)
cx1
- the horizontal coordinate of the first control pointcy1
- the vertical coordinate of the first control pointcx2
- the horizontal coordinate of the second control pointcy2
- the vertical coordinate of the second control pointx
- the horizontal coordinate of the end of the curvey
- the vertical coordinate of the end of the curvepublic void cubicRel(byte cx1, byte cy1, byte cx2, byte cy2, byte x, byte y)
cx1
- the horizontal coordinate of the first control pointcy1
- the vertical coordinate of the first control pointcx2
- the horizontal coordinate of the second control pointcy2
- the vertical coordinate of the second control pointx
- the horizontal coordinate of the end of the curvey
- the vertical coordinate of the end of the curve