harmony 鸿蒙drawing_surface.h

  • 2025-06-12
  • 浏览 (4)

drawing_surface.h

Overview

The drawing_surface.h file declares the functions related to the surface in the drawing module, including creating, destroying, and using the surface.

File to include: <native_drawing/drawing_surface.h>

Library: libnative_drawing.so

Since: 12

Related module: Drawing

Summary

Functions

Name Description
OH_Drawing_Surface * OH_Drawing_SurfaceCreateFromGpuContext (OH_Drawing_GpuContext *, bool budgeted, OH_Drawing_Image_Info) Creates an OH_Drawing_Surface object using the GPU context to manage the content drawn on the canvas.
OH_Drawing_Surface * OH_Drawing_SurfaceCreateOnScreen (OH_Drawing_GpuContext *gpuContext, OH_Drawing_Image_Info imageInfo, void *window) Creates an OH_Drawing_Surface object bound to the window using the GPU context to manage the content drawn on the canvas.
OH_Drawing_Canvas * OH_Drawing_SurfaceGetCanvas (OH_Drawing_Surface *) Obtains a canvas from an OH_Drawing_Surface object.
OH_Drawing_ErrorCode OH_Drawing_SurfaceFlush (OH_Drawing_Surface *surface) Pushes the drawing content from an OH_Drawing_Surface object to the GPU for rendering.
void OH_Drawing_SurfaceDestroy (OH_Drawing_Surface *) Destroys an OH_Drawing_Surface object and reclaims the memory occupied.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙ArkGraphics 2D

harmony 鸿蒙BufferHandle

harmony 鸿蒙ColorSpacePrimaries

harmony 鸿蒙DisplaySoloist_ExpectedRateRange

harmony 鸿蒙_drawing

harmony 鸿蒙NativeColorSpaceManager

harmony 鸿蒙NativeDisplaySoloist

harmony 鸿蒙NativeVsync

harmony 鸿蒙NativeWindow

harmony 鸿蒙OH_Drawing_BitmapFormat

0  赞