OHOS::UICanvas
Description:
Defines a canvas, which is used to draw multiple types of 2D graphs.
Since:
1.0
Version:
1.0
A constructor used to create a UICanvas instance. |
|
A destructor used to delete the UICanvas instance. |
|
Clear () |
|
(const Point &startPoint) |
Sets the coordinates of the start point for drawing a line. For example, if startPoint is set to {50, 50}, the line is drawn from this set of coordinates on the canvas. |
const Point & |
|
(const Point &endPoint, const &paint) |
|
DrawLine (const &startPoint, const Point &endPoint, const &paint) |
Draws a straight line from the coordinates of the start point. |
DrawCurve (const &control1, const Point &control2, const &endPoint, const Paint &paint) |
|
(const Point &startPoint, const &control1, const Point &control2, const &endPoint, const Paint &paint) |
Draws a cubic Bezier curve from the start point coordinates. |
(const Point &startPoint, int16_t height, int16_t width, const &paint) |
|
DrawCircle (const ¢er, uint16_t radius, const Paint &paint) |
|
(const Point ¢er, uint16_t radius, int16_t startAngle, int16_t endAngle, const &paint) |
|
DrawArc (const ¢er, uint16_t radius, int16_t startAngle, int16_t endAngle, const Paint &paint) |
|
(const Point &startPoint, const char image, const &paint) |
|
DrawLabel (const &startPoint, const char text, uint16_t maxWidth, const FontStyle &fontStyle, const &paint) |
|
OnDraw (const &invalidatedArea) override |
|
UIView () |
|
UIView (const char id) |
|
~UIView () |
|
OnPreDraw (const &invalidatedArea) |
Called before a view is drawn. This function is used to check whether the parent view of this view needs to be redrawn so as to optimize the drawing process. |
OnPostDraw (const &invalidatedArea) |
|
ReMeasure () |
|
InvalidateRect (const &invalidatedArea) |
|
OnLongPressEvent (const &event) |
|
OnDragStartEvent (const &event) |
|
OnDragEvent (const &event) |
|
OnDragEndEvent (const &event) |
|
OnClickEvent (const &event) |
|
OnPressEvent (const &event) |
|
OnReleaseEvent (const &event) |
|
OnCancelEvent (const &event) |
|
SetOnDragListener ( onDragListener) |
|
SetOnClickListener ( onClickListener) |
|
SetOnLongPressListener ( onLongPressListener) |
|
SetOnTouchListener ( onTouchListener) |
|
GetTargetView (const &point, UIView **last) |
|
(UIView parent) |
|
(UIView sibling) |
|
IsVisible () const |
|
IsTouchable () const |
|
IsDraggable () const |
|
Sets whether to transfer the drag event to the parent view for processing when the view is being dragged. |
|
IsDragParentInstead () const |
Obtains whether the view transfers a drag event to the parent view for processing. |
Obtains the absolute rectangle area of the view. When the view has deformation such as rotation, the rectangle area is the intersection set of the absolute rectangle area and deformation matrix. |
|
Obtains the valid absolute rectangle area of the view. The valid area refers to the area where the view can be displayed. Generally, the valid area is the same as the visible view area, but they may be different in the grid layout. |
|
virtual Rect Obtains the content of the absolute rectangle area of the view. This area excludes padding. |
|
Obtains the rectangular area of the view relative to the parent view, that is, the rectangular area relative to the coordinates of the parent view. |
|
Adjusts the size of the visible area. This operation may affect the final display size. |
|
SetWidth (int16_t width) |
|
SetHeight (int16_t height) |
|
Resize (int16_t width, int16_t height) |
|
GetX () const |
|
GetY () const |
|
SetPosition (int16_t x, int16_t y, int16_t width, int16_t height) |
|
SetIntercept (bool isIntercept) |
Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing. |
(const TransformMap &transMap) |
|
virtual UIView |
|
GetViewId () const |
|
(int16_t index) |
|
LayoutChildren (bool neeInvalidate=false) |
Lays out all child views according to the preset arrangement mode. |
LayoutLeftOfParent (int16_t offset=0) |
|
LayoutTopOfParent (int16_t offset=0) |
|
AlignLeftToSibling (const char id, int16_t offset=0) |
|
AlignTopToSibling (const char id, int16_t offset=0) |
|
AlignHorCenterToSibling (const char id, int16_t offset=0) |
Aligns the view with the center of a sibling view in the x-axis. |
Aligns the view with the center of a sibling view in the y-axis. |
|
LayoutLeftToSibling (const char id, int16_t offset=0) |
|
LayoutTopToSibling (const char id, int16_t offset=0) |
|
SetStyle ( &style) |
|
SetStyle (uint8_t key, int64_t value) |
|
GetStyleConst () const |
Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory. |
operator new (size_t size) |
|