harmony 鸿蒙drawing_region.h

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

drawing_region.h

Overview

The drawing_region.h file declares the functions related to the region in the drawing module, including creating a region, setting the boundary, and destroying a region.

File to include: <native_drawing/drawing_region.h>

Library: libnative_drawing.so

Since: 12

Related module: Drawing

Summary

Types

Name Description
typedef enum OH_Drawing_RegionOpMode OH_Drawing_RegionOpMode Defines an enum for the operation modes available for a region.

Enums

Name Description
OH_Drawing_RegionOpMode {
REGION_OP_MODE_DIFFERENCE, REGION_OP_MODE_INTERSECT, REGION_OP_MODE_UNION, REGION_OP_MODE_XOR,
REGION_OP_MODE_REVERSE_DIFFERENCE, REGION_OP_MODE_REPLACE
}
Enumerates the operation modes available for a region.

Functions

Name Description
OH_Drawing_Region * OH_Drawing_RegionCreate (void) Creates an OH_Drawing_Region object for more accurate graphical control.
bool OH_Drawing_RegionContains (OH_Drawing_Region *region, int32_t x, int32_t y) Checks whether a region contains the specified point.
bool OH_Drawing_RegionOp (OH_Drawing_Region *region, const OH_Drawing_Region *other, OH_Drawing_RegionOpMode op) Combines two regions based on the specified operation mode.
bool OH_Drawing_RegionSetRect (OH_Drawing_Region *region, const OH_Drawing_Rect *rect) Sets the boundary for an OH_Drawing_Region object.
bool OH_Drawing_RegionSetPath (OH_Drawing_Region *region, const OH_Drawing_Path *path, const OH_Drawing_Region *clip) Sets a region to the area described by the path.
void OH_Drawing_RegionDestroy (OH_Drawing_Region *) Destroys an OH_Drawing_Region object and reclaims the memory occupied by the object.

你可能感兴趣的鸿蒙文章

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  赞