OHOS::UICanvas
Description:
Defines a canvas, which is used to draw multiple types of 2D graphs.
Since:
1.0
Version:
1.0
UICanvas () |
|
~UICanvas () |
|
GetViewType () const override |
|
SetStartPosition (const &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. |
GetStartPosition () const |
|
(const Point &startPoint, const &endPoint, const Paint &paint) |
Draws a straight line from the coordinates of the start point. |
(const Point &control1, const &control2, const Point &endPoint, const &paint) |
|
DrawCurve (const &startPoint, const Point &control1, const &control2, const Point &endPoint, const &paint) |
Draws a cubic Bezier curve from the start point coordinates. |
DrawRect (const &startPoint, int16_t height, int16_t width, const Paint &paint) |
|
(const Point ¢er, uint16_t radius, const &paint) |
|
DrawSector (const ¢er, uint16_t radius, int16_t startAngle, int16_t endAngle, const Paint &paint) |
|
(const Point ¢er, uint16_t radius, int16_t startAngle, int16_t endAngle, const &paint) |
|
DrawImage (const &startPoint, const char image, const Paint &paint) |
|
(const Point &startPoint, const char text, uint16_t maxWidth, const &fontStyle, const Paint &paint) |
|
(const Rect &invalidatedArea) override |
|
A default constructor used to create an UIView instance. |
|
A constructor used to create an UIView instance. |
|
A destructor used to delete the UIView instance. |
|
(const Rect &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. |
(const Rect &invalidatedArea) |
|
Invalidate () |
|
(const Rect &invalidatedArea) |
|
(const LongPressEvent &event) |
|
(const DragEvent &event) |
|
(const DragEvent &event) |
|
(const DragEvent &event) |
|
(const ClickEvent &event) |
|
(const PressEvent &event) |
|
(const ReleaseEvent &event) |
|
(const CancelEvent &event) |
|
(OnDragListener onDragListener) |
|
(OnClickListener onClickListener) |
|
(OnLongPressListener onLongPressListener) |
|
(OnTouchListener onTouchListener) |
|
(const Point &point, **last) |
|
SetParent ( parent) |
|
GetParent () const |
|
SetNextSibling ( sibling) |
|
GetNextSibling () const |
|
SetVisible (bool visible) |
|
SetTouchable (bool touch) |
|
SetDraggable (bool draggable) |
|
SetDragParentInstead (bool dragParentInstead) |
Sets whether to transfer the drag event to the parent view for processing when the view is being dragged. |
Obtains whether the view transfers a drag event to the parent view for processing. |
|
GetRect () const |
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. |
GetVisibleRect () const |
|
GetMaskedRect () const |
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. |
GetOrigRect () const |
|
Obtains the content of the absolute rectangle area of the view. This area excludes padding. |
|
GetRelativeRect () const |
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. |
ResizeVisibleArea (int16_t x, int16_t y, int16_t width, int16_t height) |
Adjusts the size of the visible area. This operation may affect the final display size. |
GetWidth () |
|
GetHeight () |
|
SetX (int16_t x) |
|
SetY (int16_t y) |
|
SetPosition (int16_t x, int16_t y) |
|
IsViewGroup () const |
|
Sets whether to intercept the drag event. If intercepted, the view does not transfer the drag event to the parent view after local processing. |
|
SetTransformMap (const &transMap) |
|
GetChildById (const char id) const |
|
SetViewId (const char id) |
|
SetViewIndex (int16_t ) |
|
GetViewIndex () const |
|
Lays out all child views according to the preset arrangement mode. |
|
LayoutCenterOfParent (int16_t xOffSet=0, int16_t yOffset=0) |
|
LayoutRightOfParent (int16_t offset=0) |
|
LayoutBottomOfParent (int16_t offset=0) |
|
AlignRightToSibling (const char id, int16_t offset=0) |
|
AlignBottomToSibling (const char id, int16_t offset=0) |
|
Aligns the view with the center of a sibling view in the x-axis. |
|
AlignVerCenterToSibling (const char id, int16_t offset=0) |
Aligns the view with the center of a sibling view in the y-axis. |
LayoutRightToSibling (const char id, int16_t offset=0) |
|
LayoutBottomToSibling (const char id, int16_t offset=0) |
|
(Style &style) |
|
GetStyle (uint8_t key) const |
|
const Style & Obtains the view style. This function applies to scenarios where the style does not need to be modified, which saves memory. |
|
operator delete (void *p) |