public class FreeformOverlay extends Overlay
Overlay.LineStyle
Modifier and Type | Field and Description |
---|---|
protected android.graphics.PointF[] |
_p |
protected android.graphics.Path |
_path |
static java.lang.String |
ID |
bounds, color, dpiScale, fillColor, fontSize, LINE_TYPE_DASH, LINE_TYPE_DASH_DOT, LINE_TYPE_DASH_DOT_DOT, LINE_TYPE_DOT, LINE_TYPE_SOLID, name, strokeStyle, strokeWidth, TAG, uid
Constructor and Description |
---|
FreeformOverlay(PolygonCommand shape) |
FreeformOverlay(PolylineCommand line) |
Modifier and Type | Method and Description |
---|---|
void |
draw(android.graphics.Canvas canvas,
android.graphics.Paint paint)
Draw overlay on canvas
By default this sets up the paint with this overlay's attributes
|
android.graphics.PointF[] |
getPoints()
Get all points that control this overlay
|
boolean |
isClosed() |
void |
offset(float x,
float y)
Offset the entire overlay by a given x,y value
|
protected void |
recalcBounds() |
protected void |
recalcPath()
Recalculate path object based on updated vertices
|
void |
setup(java.util.List<android.graphics.PointF> points) |
void |
setup(android.graphics.Point... points) |
void |
setup(android.graphics.PointF... points)
a triangle has three points
|
getBounds, getColor, getFillColor, getFontSize, getIntBounds, getIntBounds, getName, getStrokeStyle, getStrokeWidth, getUID, isFilled, offset, setColor, setDpiScale, setFillColor, setFontSize, setName, setStrokeStyle, setStrokeWidth, withinBounds, withinBounds
public static final java.lang.String ID
protected android.graphics.PointF[] _p
protected android.graphics.Path _path
public FreeformOverlay(PolylineCommand line)
public FreeformOverlay(PolygonCommand shape)
public void setup(android.graphics.PointF... points)
public void setup(android.graphics.Point... points)
public void setup(java.util.List<android.graphics.PointF> points)
protected void recalcBounds()
protected void recalcPath()
public android.graphics.PointF[] getPoints()
Overlay
public void offset(float x, float y)
Overlay
public void draw(android.graphics.Canvas canvas, android.graphics.Paint paint)
Overlay
public boolean isClosed()