class ShapeDescriptor
| Package: | dji.open.pilot.base.ui.model |
Description:
Background shape descriptor that encapsulates background styles such as corner radius, stroke, and fill color.
Supported since MSDK 5.20.1
Class Members:
method getCornerRadius
| Package: | dji.open.pilot.base.ui.model |
Description:
Gets the uniform corner radius of the four corners (dp).
Supported since MSDK 5.20.1
Return:
| float | The uniform corner radius of the four corners (dp). |
method getCornerRadii
| Package: | dji.open.pilot.base.ui.model |
Description:
Gets the array of individual corner radii of the four corners (dp), which may be null.
Supported since MSDK 5.20.1
Return:
| float[] | The array of individual corner radii of the four corners (dp), may be null. |
method getStrokeWidth
| Package: | dji.open.pilot.base.ui.model |
Description:
Gets the stroke width (dp).
Supported since MSDK 5.20.1
Return:
| int | The stroke width (dp). |
method getStrokeColor
| Package: | dji.open.pilot.base.ui.model |
Description:
Gets the stroke color (ARGB).
Supported since MSDK 5.20.1
Return:
| int | The stroke color (ARGB). |
method getFillColor
| Package: | dji.open.pilot.base.ui.model |
Description:
Gets the fill color (ARGB).
Supported since MSDK 5.20.1
Return:
| int | The fill color (ARGB). |
method getShape
| Package: | dji.open.pilot.base.ui.model |
Description:
Gets the shape type - SHAPE_RECTANGLE or SHAPE_OVAL.
Supported since MSDK 5.20.1
Return:
| int | The shape type - SHAPE_RECTANGLE or SHAPE_OVAL. |
method toJson
| Package: | dji.open.pilot.base.ui.model |
Description:
Serializes the current object into a JSON string.
Supported since MSDK 5.20.1
Return:
| String | A JSON string, or an empty string on failure. |
method fromJson
static ShapeDescriptor fromJson(String json)
|
| Package: | dji.open.pilot.base.ui.model |
Description:
Restores a ShapeDescriptor from a JSON string. Called by the server when processing RemoteViewProperty.BACKGROUND_SHAPE.
Supported since MSDK 5.20.1
| String json | The string generated by toJson(). |
Return:
| static ShapeDescriptor | The restored ShapeDescriptor, or null if parsing fails. |
class Builder ↗
描述
ShapeDescriptor builder.
MSDK 5.20.1开始支持