public class SvgShader extends ShaderHelper
| Modifier and Type | Field and Description |
|---|---|
static int |
BORDER_TYPE_DEFAULT |
static int |
BORDER_TYPE_FILL |
static int |
STROKE_CAP_BUTT |
static int |
STROKE_CAP_DEFAULT |
static int |
STROKE_CAP_ROUND |
static int |
STROKE_CAP_SQUARE |
static int |
STROKE_JOIN_BEVEL |
static int |
STROKE_JOIN_DEFAULT |
static int |
STROKE_JOIN_MITER |
static int |
STROKE_JOIN_ROUND |
borderAlpha, borderColor, borderPaint, borderWidth, drawable, imagePaint, matrix, shader, square, viewHeight, viewWidth| Constructor and Description |
|---|
SvgShader() |
SvgShader(int resId) |
SvgShader(int resId,
int borderType) |
| Modifier and Type | Method and Description |
|---|---|
void |
calculate(int bitmapWidth,
int bitmapHeight,
float width,
float height,
float scale,
float translateX,
float translateY) |
void |
draw(android.graphics.Canvas canvas,
android.graphics.Paint imagePaint,
android.graphics.Paint borderPaint) |
void |
init(android.content.Context context,
android.util.AttributeSet attrs,
int defStyle) |
void |
reset() |
void |
setBorderType(int borderType) |
void |
setShapeResId(android.content.Context context,
int resId) |
void |
setStrokeCap(int strokeCap) |
void |
setStrokeJoin(int strokeJoin) |
void |
setStrokeMiter(int strokeMiter) |
calculateDrawableSizes, createShader, dpToPx, getBitmap, getBorderAlpha, getBorderColor, getBorderWidth, isSquare, onDraw, onImageDrawableReset, onSizeChanged, setBorderAlpha, setBorderColor, setBorderWidth, setSquarepublic static final int BORDER_TYPE_DEFAULT
public static final int BORDER_TYPE_FILL
public static final int STROKE_CAP_DEFAULT
public static final int STROKE_CAP_BUTT
public static final int STROKE_CAP_ROUND
public static final int STROKE_CAP_SQUARE
public static final int STROKE_JOIN_DEFAULT
public static final int STROKE_JOIN_BEVEL
public static final int STROKE_JOIN_MITER
public static final int STROKE_JOIN_ROUND
public SvgShader()
public SvgShader(int resId)
public SvgShader(int resId,
int borderType)
public void init(android.content.Context context,
android.util.AttributeSet attrs,
int defStyle)
init in class ShaderHelperpublic void setShapeResId(android.content.Context context,
int resId)
public void setStrokeMiter(int strokeMiter)
public void setStrokeCap(int strokeCap)
public void setStrokeJoin(int strokeJoin)
public void setBorderType(int borderType)
public void draw(android.graphics.Canvas canvas,
android.graphics.Paint imagePaint,
android.graphics.Paint borderPaint)
draw in class ShaderHelperpublic void calculate(int bitmapWidth,
int bitmapHeight,
float width,
float height,
float scale,
float translateX,
float translateY)
calculate in class ShaderHelperpublic void reset()
reset in class ShaderHelper