public class OvalShape extends Shape
dashType, hasAddedToPaintList, id, isHoverTrace, mPaint, number, rotateAngle, sendByUserName, sendByUserNumber, userRole
构造器和说明 |
---|
OvalShape(Paint paint,
boolean isFill) |
限定符和类型 | 方法和说明 |
---|---|
void |
appendPoint(LPPointF point) |
void |
copyShape(Shape shape) |
RectF |
getBoundary()
获取shape 范围参数
|
Paint |
getFillPaint() |
float |
getHeight() |
java.util.ArrayList<LPPointF> |
getPoints()
发送用点集
|
float |
getWidth() |
boolean |
isBoundaryOverlap(RectF rect)
判断多选框的四个顶点 以及四条边与oval坐标系的焦点 是否在椭圆内
|
boolean |
isInBoundary(float x,
float y)
判断点击事件 是否位于shape 范围
|
boolean |
isTouchShape(float x,
float y)
判断是否点击到shape
|
boolean |
isValid()
图形是否有效.
|
void |
moveShapeBy(float deltaX,
float deltay)
move shape by
|
void |
onDraw(Canvas canvas,
Matrix matrix)
绘制图形 在onDraw里调用 避免复杂的计算和内存分配
param canvas
|
void |
onDraw(Canvas canvas,
Matrix matrix,
ShapeRegionInfo regionInfo)
绘制图形
|
void |
scaleShapeBy(int scaleDir,
float scaleX,
float scaleY,
float offsetX,
float offsetY,
RectF boundaryRect,
boolean isMoreSelect)
scale shape to sourcePoint
|
void |
setAngle(float rotateAngle)
设置当前角度
|
void |
setHeight(float height) |
void |
setSourcePoint(LPPointF sourcePoint) |
void |
setWidth(float width) |
calcRotatePoint, copy, equals, getIn_angle, getPaint, getSourcePoint, setPaint
public void appendPoint(LPPointF point)
appendPoint
在类中 Shape
public void setWidth(float width)
public void setHeight(float height)
public Paint getFillPaint()
public void onDraw(Canvas canvas, Matrix matrix)
Shape
public void onDraw(Canvas canvas, Matrix matrix, ShapeRegionInfo regionInfo)
Shape
public boolean isInBoundary(float x, float y)
Shape
isInBoundary
在类中 Shape
x
- rawXy
- rawYpublic boolean isTouchShape(float x, float y)
Shape
isTouchShape
在类中 Shape
x
- rawXy
- rawYpublic boolean isBoundaryOverlap(RectF rect)
isBoundaryOverlap
在类中 Shape
rect
- 多选框public RectF getBoundary()
Shape
getBoundary
在类中 Shape
public void moveShapeBy(float deltaX, float deltay)
Shape
moveShapeBy
在类中 Shape
deltaX
- distance by xdeltay
- distance by ypublic void scaleShapeBy(int scaleDir, float scaleX, float scaleY, float offsetX, float offsetY, RectF boundaryRect, boolean isMoreSelect)
Shape
scaleShapeBy
在类中 Shape
scaleDir
- scale directionscaleX
- X xiascaleY
- Y xiaoffsetX
- 缩放X轴相对原来中心点偏移量offsetY
- 缩放Y轴相对原来中心点偏移量boundaryRect
- 外接框范围isMoreSelect
- 是否多选缩放,需要处理旋转角度在90 ~ 270scaleDir置相反public float getWidth()
public float getHeight()
public void setSourcePoint(LPPointF sourcePoint)
setSourcePoint
在类中 Shape