public class PathBufferFP32 extends PathBufferBase
vg_lite_path
in FP32 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 |
---|
PathBufferFP32() |
Modifier and Type | Method and Description |
---|---|
protected void |
command(int cmd)
Adds a command with zero points in the path data
|
void |
cubic(float cx1,
float cy1,
float cx2,
float cy2,
float x,
float 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(float cx1,
float cy1,
float cx2,
float cy2,
float x,
float 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(float x,
float 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(float x,
float 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(float x,
float y)
Add a move command to the given point.
|
void |
moveRel(float x,
float y)
Add a move command to the given point.
|
void |
quad(float cx,
float cy,
float x,
float 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(float cx,
float cy,
float x,
float 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(float x,
float 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 datapublic void setOffset(float x, float y)
x
- The horizontal offsety
- The vertical offsetpublic void move(float x, float y)
x
- the horizontal coordinate of the point to move toy
- the vertical coordinate of the point to move topublic void moveRel(float x, float y)
x
- the horizontal coordinate of the point to move toy
- the vertical coordinate of the point to move topublic void line(float x, float y)
x
- the horizontal coordinate of the end of the liney
- the vertical coordinate of the end of the linepublic void lineRel(float x, float 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(float cx, float cy, float x, float 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(float cx, float cy, float x, float 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(float cx1, float cy1, float cx2, float cy2, float x, float 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(float cx1, float cy1, float cx2, float cy2, float x, float 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