class DrawingTextInfo
@Keep class DrawingTextInfo implements Parcelable
Package: dji.open.pilot.base.ui.cameraview
Description:
Custom text overlay information, used to overlay and display text on the camera view in real time. Supported since MSDK 5.20.1
Class Members:
Members
final ALIGN_LEFT
static final int ALIGN_LEFT = 0
Package: dji.open.pilot.base.ui.cameraview
Description:
Horizontal alignment: the anchor is the left edge of the text.
final ALIGN_CENTER
static final int ALIGN_CENTER = 1
Package: dji.open.pilot.base.ui.cameraview
Description:
Horizontal alignment: the anchor is the horizontal center of the text.
final ALIGN_RIGHT
static final int ALIGN_RIGHT = 2
Package: dji.open.pilot.base.ui.cameraview
Description:
Horizontal alignment: the anchor is the right edge of the text.
method getAnchor
Package: dji.open.pilot.base.ui.cameraview
Description:
Gets the text anchor coordinates. Supported since MSDK 5.20.1
Return:
OpenPoint The anchor coordinates (normalized, 0.0 to 1.0). The horizontal meaning is determined by horizontalAlignment, and the vertical direction is fixed as the vertical center of the whole text.
method setAnchor
void setAnchor (OpenPoint anchor)
Package: dji.open.pilot.base.ui.cameraview
Description:
Sets the text anchor coordinates. Supported since MSDK 5.20.1
OpenPoint anchor The anchor coordinates (normalized, 0.0 to 1.0). The horizontal meaning is determined by horizontalAlignment, and the vertical direction is fixed as the vertical center of the whole text.
method getText
Package: dji.open.pilot.base.ui.cameraview
Description:
Gets the text content. Supported since MSDK 5.20.1
Return:
String The text content. Line breaks with \n are supported. Nothing is drawn when it is an empty string.
method setText
void setText (String text)
Package: dji.open.pilot.base.ui.cameraview
Description:
Sets the text content. Supported since MSDK 5.20.1
String text The text content. Line breaks with \n are supported. Nothing is drawn when it is an empty string.
method getTextSize
Package: dji.open.pilot.base.ui.cameraview
Description:
Gets the font size. Supported since MSDK 5.20.1
Return:
float The font size (in sp).
method setTextSize
void setTextSize (float textSize)
Package: dji.open.pilot.base.ui.cameraview
Description:
Sets the font size. Supported since MSDK 5.20.1
float textSize The font size (in sp).
method getTextColor
Package: dji.open.pilot.base.ui.cameraview
Description:
Gets the text color. Supported since MSDK 5.20.1
Return:
int The text color (ARGB).
method setTextColor
void setTextColor (int textColor)
Package: dji.open.pilot.base.ui.cameraview
Description:
Sets the text color. Supported since MSDK 5.20.1
int textColor The text color (ARGB).
method getBackgroundColor
Package: dji.open.pilot.base.ui.cameraview
Description:
Gets the text background color. Supported since MSDK 5.20.1
Return:
int The text background color (ARGB). No background is drawn when the alpha channel is 0.
method setBackgroundColor
void setBackgroundColor (int backgroundColor)
Package: dji.open.pilot.base.ui.cameraview
Description:
Sets the text background color. Supported since MSDK 5.20.1
int backgroundColor The text background color (ARGB). No background is drawn when the alpha channel is 0.
method getHorizontalAlignment
int getHorizontalAlignment ()
Package: dji.open.pilot.base.ui.cameraview
Description:
Gets the horizontal alignment. Supported since MSDK 5.20.1
Return:
int The horizontal alignment. The value is one of ALIGN_LEFT, ALIGN_CENTER, or ALIGN_RIGHT.
method setHorizontalAlignment
void setHorizontalAlignment (int horizontalAlignment)
Package: dji.open.pilot.base.ui.cameraview
Description:
Sets the horizontal alignment. Supported since MSDK 5.20.1
int horizontalAlignment The horizontal alignment. The value is one of ALIGN_LEFT, ALIGN_CENTER, or ALIGN_RIGHT.