文档管理中心

VectorElement

java.lang.Object

|---ohos.agp.components.element.Element

|---|---ohos.agp.components.element.VectorElement

public class VectorElement
extends Element
Provides an Element object that supports vector drawing.

You can use this class to draw vector elements to prevent image distortion after scaling.

Since:

3

Nested Class Summary

Field Summary

展开

Fields inherited from class ohos.agp.components.element.Element

ALPHA_DEFAULT, ALPHA_MAX, ALPHA_MIN, DEFAULT_BOUNDS_RECT, MAX_RANK, MIN_RANK

Constructor Summary

展开

Constructor

Description

VectorElement​(Context context, int xmlId)

A constructor used to create a VectorElement instance based on the specified XML resource.

Constructor Detail

VectorElement

public VectorElement​(Context context, int xmlId)

A constructor used to create a VectorElement instance based on the specified XML resource.

Parameters:

展开

Parameter Name

Parameter Description

context

Indicates the application context.

xmlId

Indicates the ID of the XML resource.

Since:

3

Method Detail

setAntiAlias

public void setAntiAlias​(boolean isAntiAlias)

Sets the anti-aliasing function.

Note: be careful with the changing this property because it will affect all instances of an element loaded from the same resource.

Parameters:

展开

Parameter Name

Parameter Description

isAntiAlias

Indicates whether the Anti-Aliasing function is enabled. true indicates enabled.

Since:

3

isAntiAlias

public boolean isAntiAlias​()

Checks whether Anti-Aliasing is enabled.

Returns:

Returns true if antialiasing is enabled; returns false otherwise.

Since:

4

搜索
请输入您想要搜索的关键词