public class VectorElement extends Element
Element object that supports vector drawing.
You can use this class to draw vector elements to prevent image distortion after scaling.
Element.ConstantState, Element.OnBoundsChangeListener, Element.OnChangeListener, Element.OnLayoutDirectionChangeListener, Element.OnRankChangeListenerALPHA_DEFAULT, ALPHA_MAX, ALPHA_MIN, DEFAULT_BOUNDS_RECT, MAX_RANK, MIN_RANK| 构造器 | 说明 |
|---|---|
VectorElement(Context context,
int xmlId) |
A constructor used to create a
VectorElement instance based on the specified XML resource. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
boolean |
isAntiAlias() |
Checks whether Anti-Aliasing is enabled.
|
void |
setAntiAlias(boolean isAntiAlias) |
Sets the anti-aliasing function.
|
clearColorMatrix, drawToCanvas, getAlpha, getBounds, getCallback, getColorMatrix, getCurrentElement, getHeight, getLayoutDirection, getMinHeight, getMinWidth, getPadding, getRank, getStateColorMode, getVisible, getWidth, isInheritDirection, isStateful, isVisible, release, setAlpha, setBounds, setBounds, setCallback, setColorMatrix, setInheritDirection, setLayoutDirection, setOnBoundsChangeListener, setOnLayoutDirectionChangeListener, setOnRankChangeListener, setRank, setStateColor, setStateColorList, setStateColorMode, setVisible, skipAnimationpublic VectorElement(Context context, int xmlId)
VectorElement instance based on the specified XML resource.context - Indicates the application context.xmlId - Indicates the ID of the XML resource.public void setAntiAlias(boolean isAntiAlias)
Note: be careful with the changing this property because it will affect all instances of an element loaded from the same resource.
isAntiAlias - Indicates whether the Anti-Aliasing function is enabled. true indicates enabled.public boolean isAntiAlias()
true if antialiasing is enabled; returns false otherwise.