drawing_mask_filter.h
Overview
This file declares the functions related to the mask filter in the drawing module.
File to include: <native_drawing/drawing_mask_filter.h>
Library: libnative_drawing.so
System capability: SystemCapability.Graphic.Graphic2D.NativeDrawing
Since: 11
Related module: Drawing
Summary
Enumerated value
| Name | typedef Keyword | Description |
|---|---|---|
| OH_Drawing_BlurType | OH_Drawing_BlurType | Defines an enum for the blur types. |
Functions
| Name | Description |
|---|---|
| OH_Drawing_MaskFilter* OH_Drawing_MaskFilterCreateBlur(OH_Drawing_BlurType blurType, float sigma, bool respectCTM) | Creates an OH_Drawing_MaskFilter object with a blur type. |
| void OH_Drawing_MaskFilterDestroy(OH_Drawing_MaskFilter* maskFilter) | Destroys an OH_Drawing_MaskFilter object and reclaims the memory occupied by the object. |
Enum Description
OH_Drawing_BlurType
enum OH_Drawing_BlurType
Description
Defines an enum for the blur types.
Since: 11
| Value | Description |
|---|---|
| NORMAL | Blurs both inside and outside the original border. |
| SOLID | Draws solid inside the border, and blurs outside. |
| OUTER | Draws nothing inside the border, and blurs outside. |
| INNER | Blurs inside the border, and draws nothing outside. |
Function Description
OH_Drawing_MaskFilterCreateBlur()
OH_Drawing_MaskFilter* OH_Drawing_MaskFilterCreateBlur(OH_Drawing_BlurType blurType, float sigma, bool respectCTM)
Description
Creates an OH_Drawing_MaskFilter object with a blur type.
System capability: SystemCapability.Graphic.Graphic2D.NativeDrawing
Since: 11
Parameters
| Name | Description |
|---|---|
| OH_Drawing_BlurType blurType | Blur type. |
| float sigma | Standard deviation of the Gaussian blur to apply. The value must be greater than 0. |
| bool respectCTM | Whether the blur standard deviation is modified by the current transformation matrix (CTM). The default value is true. true: The blur standard deviation is affected by the CTM. false: The blur standard deviation is fixed and not affected by the CTM. |
Returns
| Type | Description |
|---|---|
| OH_Drawing_MaskFilter* | Returns the pointer to the OH_Drawing_MaskFilter object created. |
OH_Drawing_MaskFilterDestroy()
void OH_Drawing_MaskFilterDestroy(OH_Drawing_MaskFilter* maskFilter)
Description
Destroys an OH_Drawing_MaskFilter object and reclaims the memory occupied by the object.
System capability: SystemCapability.Graphic.Graphic2D.NativeDrawing
Since: 11
Parameters
| Name | Description |
|---|---|
| OH_Drawing_MaskFilter* maskFilter | Pointer to an OH_Drawing_MaskFilter object. |
你可能感兴趣的鸿蒙文章
openharmony 鸿蒙 capi-drawing-gpu-context-h
openharmony 鸿蒙 capi-drawing-nativepixelmap-
openharmony 鸿蒙 capi-nativevsync-oh-nativevsync-expectedraterange
openharmony 鸿蒙 capi-drawing-oh-drawing-brush
openharmony 鸿蒙 capi-drawing-oh-drawing-image-info
openharmony 鸿蒙 capi-drawing-text-linetypography-h
openharmony 鸿蒙 capi-oh-nativeimage-oh-nativeimage
openharmony 鸿蒙 capi-drawing-typeface-h