public class PathBufferS16 extends PathBufferBase
vg_lite_path
in S16 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 |
---|
PathBufferS16() |
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,
short x,
short y)
Adds a command with 1 point parameter in the path data
|
protected void |
command(int cmd,
short x1,
short y1,
short x2,
short y2)
Adds a command with 2 points parameter in the path data
|
protected void |
command(int cmd,
short x1,
short y1,
short x2,
short y2,
short x3,
short y3)
Adds a command with 3 points parameter in the path data
|
void |
cubic(short cx1,
short cy1,
short cx2,
short cy2,
short x,
short 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(short cx1,
short cy1,
short cx2,
short cy2,
short x,
short 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(short x,
short 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(short x,
short 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(short x,
short y)
Add a move command to the given point.
|
void |
moveRel(short x,
short y)
Add a move command to the given point.
|
void |
quad(short cx,
short cy,
short x,
short 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(short cx,
short cy,
short x,
short 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(short x,
short 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, short x, short 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, short x1, short y1, short x2, short 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, short x1, short y1, short x2, short y2, short x3, short 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(short x, short y)
x
- The horizontal offsety
- The vertical offsetpublic void move(short x, short y)
x
- the horizontal coordinate of the point to move toy
- the vertical coordinate of the point to move topublic void moveRel(short x, short y)
x
- the horizontal coordinate of the point to move toy
- the vertical coordinate of the point to move topublic void line(short x, short y)
x
- the horizontal coordinate of the end of the liney
- the vertical coordinate of the end of the linepublic void lineRel(short x, short 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(short cx, short cy, short x, short 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(short cx, short cy, short x, short 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(short cx1, short cy1, short cx2, short cy2, short x, short 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(short cx1, short cy1, short cx2, short cy2, short x, short 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