Package com.shixing.sxedit
Class SXShape
- java.lang.Object
-
- com.shixing.sxedit.SXShape
-
public class SXShape extends java.lang.Object
蒙版
-
-
Constructor Summary
Constructors Constructor Description SXShape()
创建一个 Shape
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
arcTo(float x1, float y1, float x2, float y2, float radius)
以上一个点为起点添加一条弧线void
bezierTo(float c1x, float c1y, float c2x, float c2y, float x, float y)
从上一个点开始添加一条三次贝塞尔曲线void
circle(float cx, float cy, float r)
添加一个圆void
clear()
清空所有pathvoid
closePath()
闭合路径void
destroy()
销毁创建的 Shape 对象void
ellipse(float cx, float cy, float rx, float ry)
添加一个椭圆void
lineTo(float x, float y)
添加一条从上一个点到(x, y)的直线void
moveTo(float x, float y)
设置下一个轮廓的起点为 (x, y)void
quadTo(float cx, float cy, float x, float y)
从上一个点开始添加一条二次贝塞尔曲线void
rect(float x, float y, float w, float h)
添加一个矩形void
rotate(float degrees)
旋转一个角度void
roundRect(float x, float y, float w, float h, float r)
添加一个圆角矩形void
scale(float x, float y)
缩放void
transform(float[] transform)
应用一个变换矩阵void
translate(float x, float y)
应用一个位移
-
-
-
Method Detail
-
clear
public void clear()
清空所有path
-
moveTo
public void moveTo(float x, float y)
设置下一个轮廓的起点为 (x, y)
-
lineTo
public void lineTo(float x, float y)
添加一条从上一个点到(x, y)的直线
-
bezierTo
public void bezierTo(float c1x, float c1y, float c2x, float c2y, float x, float y)
从上一个点开始添加一条三次贝塞尔曲线
-
quadTo
public void quadTo(float cx, float cy, float x, float y)
从上一个点开始添加一条二次贝塞尔曲线
-
arcTo
public void arcTo(float x1, float y1, float x2, float y2, float radius)
以上一个点为起点添加一条弧线
-
closePath
public void closePath()
闭合路径
-
rect
public void rect(float x, float y, float w, float h)
添加一个矩形
-
roundRect
public void roundRect(float x, float y, float w, float h, float r)
添加一个圆角矩形
-
ellipse
public void ellipse(float cx, float cy, float rx, float ry)
添加一个椭圆
-
circle
public void circle(float cx, float cy, float r)
添加一个圆
-
rotate
public void rotate(float degrees)
旋转一个角度- Parameters:
degrees
- 旋转角度
-
translate
public void translate(float x, float y)
应用一个位移
-
scale
public void scale(float x, float y)
缩放- Parameters:
x
- x轴缩放倍数y
- y轴缩放倍数
-
transform
public void transform(float[] transform)
应用一个变换矩阵- Parameters:
transform
- 变换矩阵
-
destroy
public void destroy()
销毁创建的 Shape 对象
-
-