public abstract class CapturePP
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected float |
_borderWidth |
protected android.graphics.Canvas |
_can |
protected android.graphics.DashPathEffect |
_dashStyle |
protected android.graphics.DashPathEffect |
_dotStyle |
protected float |
_dp |
protected int |
_drawRes |
protected float |
_fontSize |
protected float |
_height |
protected float |
_iconSize |
protected float |
_labelSize |
protected float |
_lineWeight |
protected double |
_mapRes |
protected double |
_mapScale |
protected android.graphics.Paint |
_paint |
protected android.graphics.Path |
_path |
protected float |
_pdFontSize |
protected float |
_pdLabelSize |
protected float |
_width |
static double |
DEFAULT_MIN_RENDER_SCALE |
Constructor and Description |
---|
CapturePP() |
Modifier and Type | Method and Description |
---|---|
protected float |
dp(float pix)
Convert pixel to display points
_dp = smaller dimension of image / 360
|
protected float |
dr(float pix)
Multiply pixel by drawing resolution
_drawRes = 1 if rendering in capture window, _capRes otherwise
|
abstract boolean |
drawElements(android.graphics.Canvas canvas) |
void |
drawLabel(java.lang.String txt,
android.graphics.PointF pos) |
void |
drawLabel(java.lang.String txt,
android.graphics.PointF pos,
int align,
int txtColor,
boolean background)
Draw an ATAK-style map label
|
abstract android.graphics.PointF |
forward(GeoPoint gp) |
abstract GeoBounds |
getBounds() |
android.graphics.Canvas |
getCanvas() |
android.graphics.DashPathEffect |
getDashed() |
float |
getDisplayPoint() |
android.graphics.DashPathEffect |
getDotted() |
float |
getFontSize() |
float |
getHeight() |
float |
getIconSize() |
float |
getLabelSize() |
float |
getLineWeight() |
double |
getMapResolution() |
android.graphics.Paint |
getPaint() |
android.graphics.Path |
getPath() |
float |
getResolution() |
int |
getThemeColor(int color) |
float |
getWidth() |
boolean |
inside(android.graphics.PointF p) |
android.graphics.Bitmap |
loadBitmap(java.lang.String uri) |
protected void |
resetPaint() |
boolean |
shouldDrawLabel(MapItem item,
java.lang.String label) |
boolean |
shouldDrawLabel(java.lang.String label,
android.graphics.PointF[] labelLine) |
protected static int |
toInt(boolean b) |
public static final double DEFAULT_MIN_RENDER_SCALE
protected float _width
protected float _height
protected double _mapScale
protected double _mapRes
protected float _dp
protected int _drawRes
protected android.graphics.Canvas _can
protected android.graphics.Paint _paint
protected android.graphics.Path _path
protected float _fontSize
protected float _pdFontSize
protected float _labelSize
protected float _pdLabelSize
protected float _borderWidth
protected float _iconSize
protected float _lineWeight
protected android.graphics.DashPathEffect _dashStyle
protected android.graphics.DashPathEffect _dotStyle
public float getWidth()
public float getHeight()
public android.graphics.Canvas getCanvas()
public android.graphics.Paint getPaint()
public android.graphics.Path getPath()
public float getResolution()
public double getMapResolution()
public float getLineWeight()
public float getIconSize()
public float getFontSize()
public float getLabelSize()
public float getDisplayPoint()
public android.graphics.DashPathEffect getDashed()
public android.graphics.DashPathEffect getDotted()
public int getThemeColor(int color)
protected void resetPaint()
public void drawLabel(java.lang.String txt, android.graphics.PointF pos, int align, int txtColor, boolean background)
txt
- Text to drawpos
- Center position and angle of text (see yAlign)align
- Horizontal and vertical text alignment bit numtxtColor
- Color of textbackground
- True to include black background, false to border textpublic void drawLabel(java.lang.String txt, android.graphics.PointF pos)
public boolean shouldDrawLabel(MapItem item, java.lang.String label)
public boolean shouldDrawLabel(java.lang.String label, android.graphics.PointF[] labelLine)
public android.graphics.Bitmap loadBitmap(java.lang.String uri)
public boolean inside(android.graphics.PointF p)
protected float dp(float pix)
pix
- Pixel valueprotected float dr(float pix)
pix
- Pixel valueprotected static int toInt(boolean b)
public abstract android.graphics.PointF forward(GeoPoint gp)
public abstract GeoBounds getBounds()
public abstract boolean drawElements(android.graphics.Canvas canvas)