openharmony 鸿蒙 capi-drawing-mask-filter-h

2026-08-25 浏览 (1)

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

Nametypedef KeywordDescription
OH_Drawing_BlurTypeOH_Drawing_BlurTypeDefines an enum for the blur types.

Functions

NameDescription
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

ValueDescription
NORMALBlurs both inside and outside the original border.
SOLIDDraws solid inside the border, and blurs outside.
OUTERDraws nothing inside the border, and blurs outside.
INNERBlurs 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

NameDescription
OH_Drawing_BlurType blurTypeBlur type.
float sigmaStandard deviation of the Gaussian blur to apply. The value must be greater than 0.
bool respectCTMWhether 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

TypeDescription
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

NameDescription
OH_Drawing_MaskFilter* maskFilterPointer 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

openharmony 鸿蒙 capi-drawing-brush-h

openharmony 鸿蒙 capi-nativewindow

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