drawing_canvas.h

Overview

Declares functions related to the canvas object in the drawing module.

Since: 8

Related Modules:

Drawing

Summary

Functions

Name Description
OH_Drawing_CanvasCreate (void) Creates an OH_Drawing_Canvas object.
OH_Drawing_CanvasDestroy (OH_Drawing_Canvas *) Destroys an OH_Drawing_Canvas object and reclaims the memory occupied by the object.
OH_Drawing_CanvasBind (OH_Drawing_Canvas *, OH_Drawing_Bitmap *) Binds a bitmap to a canvas so that the content drawn on the canvas is output to the bitmap (this process is called CPU rendering).
OH_Drawing_CanvasAttachPen (OH_Drawing_Canvas *, const OH_Drawing_Pen *) Attaches a pen to a canvas so that the canvas will use the style and color of the pen to outline a shape.
OH_Drawing_CanvasDetachPen (OH_Drawing_Canvas *) Detaches the pen from a canvas so that the canvas will not use the style and color of the pen to outline a shape.
OH_Drawing_CanvasAttachBrush (OH_Drawing_Canvas *, const OH_Drawing_Brush *) Attaches a brush to a canvas so that the canvas will use the style and color of the brush to fill in a shape.
OH_Drawing_CanvasDetachBrush (OH_Drawing_Canvas *) Detaches the brush from a canvas so that the canvas will not use the style and color of the brush to fill in a shape.
OH_Drawing_CanvasSave (OH_Drawing_Canvas *) Saves the current canvas status (canvas matrix) to the top of the stack.
OH_Drawing_CanvasRestore (OH_Drawing_Canvas *) Restores the canvas status (canvas matrix) saved on the top of the stack.
OH_Drawing_CanvasDrawLine (OH_Drawing_Canvas *, float x1, float y1, float x2, float y2) Draws a line segment.
OH_Drawing_CanvasDrawPath (OH_Drawing_Canvas *, const OH_Drawing_Path *) Draws a path.
OH_Drawing_CanvasClear (OH_Drawing_Canvas *, uint32_t color) Clears a canvas by using a specified color.