public abstract class Overlay
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Overlay.LineStyle |
Modifier and Type | Field and Description |
---|---|
protected android.graphics.RectF |
bounds |
protected int |
color |
protected float |
dpiScale |
protected int |
fillColor |
protected int |
fontSize |
static int |
LINE_TYPE_DASH |
static int |
LINE_TYPE_DASH_DOT |
static int |
LINE_TYPE_DASH_DOT_DOT |
static int |
LINE_TYPE_DOT |
static int |
LINE_TYPE_SOLID |
protected java.lang.String |
name |
protected int |
strokeStyle |
protected int |
strokeWidth |
protected static java.lang.String |
TAG |
protected java.lang.String |
uid |
Modifier | Constructor and Description |
---|---|
protected |
Overlay(java.lang.String name) |
protected |
Overlay(java.lang.String name,
java.lang.String uid)
Create a new overlay
|
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.RectF |
getBounds() |
int |
getColor() |
int |
getFillColor() |
int |
getFontSize() |
android.graphics.Rect |
getIntBounds() |
void |
getIntBounds(android.graphics.Rect b) |
java.lang.String |
getName() |
android.graphics.PointF[] |
getPoints()
Get all points that control this overlay
|
int |
getStrokeStyle() |
int |
getStrokeWidth() |
java.lang.String |
getUID() |
boolean |
isFilled() |
void |
offset(float x,
float y)
Offset the entire overlay by a given x,y value
|
void |
offset(android.graphics.PointF offset) |
void |
setColor(int color) |
void |
setDpiScale(float scale) |
void |
setFillColor(int color) |
void |
setFontSize(int size) |
void |
setName(java.lang.String name) |
void |
setStrokeStyle(int style) |
void |
setStrokeWidth(int inSize) |
boolean |
withinBounds(float x,
float y,
float tolerance) |
static boolean |
withinBounds(android.graphics.RectF bounds,
float x,
float y,
float tolerance)
Test if a point is within this overlay's boundaries
|
protected static final java.lang.String TAG
public static final int LINE_TYPE_SOLID
public static final int LINE_TYPE_DASH
public static final int LINE_TYPE_DOT
public static final int LINE_TYPE_DASH_DOT
public static final int LINE_TYPE_DASH_DOT_DOT
protected int color
protected int fillColor
protected int strokeWidth
protected int strokeStyle
protected int fontSize
protected float dpiScale
protected java.lang.String uid
protected java.lang.String name
protected android.graphics.RectF bounds
protected Overlay(java.lang.String name, java.lang.String uid)
uid
- Overlay UIDprotected Overlay(java.lang.String name)
public void draw(android.graphics.Canvas canvas, android.graphics.Paint paint)
canvas
- Canvas to draw ontopaint
- Paint object to usepublic android.graphics.PointF[] getPoints()
public void offset(float x, float y)
x
- X offsety
- Y offsetpublic void offset(android.graphics.PointF offset)
public static boolean withinBounds(android.graphics.RectF bounds, float x, float y, float tolerance)
x
- Touch point Xy
- Touch point Ytolerance
- Touch point tolerancepublic boolean withinBounds(float x, float y, float tolerance)
public void setName(java.lang.String name)
public void setColor(int color)
public void setFillColor(int color)
public void setStrokeWidth(int inSize)
public int getStrokeWidth()
public void setStrokeStyle(int style)
public int getStrokeStyle()
public void setFontSize(int size)
public int getFontSize()
public void setDpiScale(float scale)
public int getColor()
public int getFillColor()
public boolean isFilled()
public java.lang.String getUID()
public java.lang.String getName()
public android.graphics.RectF getBounds()
public void getIntBounds(android.graphics.Rect b)
public android.graphics.Rect getIntBounds()