harmony 鸿蒙drawing_canvas.h

2023-06-24 浏览 (591)

drawing_canvas.h

Overview

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

Since: 8

Related Modules:

Drawing

Summary

Functions

NameDescription
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.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Native APIs

harmony 鸿蒙AVCapability

harmony 鸿蒙AVDemuxer

harmony 鸿蒙AVMuxer

harmony 鸿蒙AVScreenCapture

harmony 鸿蒙AVSource

harmony 鸿蒙AudioDecoder

harmony 鸿蒙AudioEncoder

harmony 鸿蒙CodecBase

harmony 鸿蒙Core

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/4a8878be2ff54eff89bc21d590068266