• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2* Copyright (c) 2024 Huawei Device Co., Ltd.
3* Licensed under the Apache License, Version 2.0 (the "License");
4* you may not use this file except in compliance with the License.
5* You may obtain a copy of the License at
6*
7* http://www.apache.org/licenses/LICENSE-2.0
8*
9* Unless required by applicable law or agreed to in writing, software
10* distributed under the License is distributed on an "AS IS" BASIS,
11* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12* See the License for the specific language governing permissions and
13* limitations under the License.
14*/
15
16/**
17 * @file
18 * @kit ArkGraphics2D
19 */
20
21import { AsyncCallback } from './@ohos.base';
22/*** if arkts 1.1 */
23import type common2D from './@ohos.graphics.common2D';
24import type image from './@ohos.multimedia.image';
25/*** endif */
26
27/**
28 * @namespace uiEffect
29 * @syscap SystemCapability.Graphics.Drawing
30 * @since arkts {'1.1':'12', '1.2':'20'}
31 * @arkts 1.1&1.2
32 */
33declare namespace uiEffect {
34
35  /**
36   * The Filter for Component.
37   * @typedef Filter
38   * @syscap SystemCapability.Graphics.Drawing
39   * @since arkts {'1.1':'12', '1.2':'20'}
40   * @arkts 1.1&1.2
41   */
42  interface Filter {
43    /**
44     * Set the edge pixel stretch effect of the Component.
45     *
46     * @param { Array<number> } stretchSizes
47     * @param { TileMode } tileMode
48     * @returns { Filter }
49     * @syscap SystemCapability.Graphics.Drawing
50     * @systemapi
51     * @since 12
52     */
53    pixelStretch(stretchSizes: Array<number>, tileMode: TileMode): Filter;
54
55    /**
56     * Set blur effect of the Component.
57     *
58     * @param { number } blurRadius
59     * @returns { Filter }
60     * @syscap SystemCapability.Graphics.Drawing
61     * @since 12
62     */
63    blur(blurRadius: number): Filter;
64
65    /**
66     * Set waterRipple effect of the Component.
67     *
68     * @param { number } progress - Indicates the ripple progress. The value 1 indicates that ripples are displayed on all screens.
69     * @param { number } waveCount - The number of waves when the water ripples. The maximum count of waves is 3, the minimum value is 1,  default is 2.
70     * @param { number } x - Represents the X-axis position of center point  where the water ripple first appears on the screen.
71     * @param { number } y - Represents the Y-axis position of center point  where the water ripple first appears on the screen.
72     * @param { WaterRippleMode } rippleMode - Set the mode of water ripple,
73     * 0 for mobile to desktop(Receive), 1 for mobile to desktop(Send), 2 for mobile to mobile, 3 for cross platform.
74     * @returns { Filter } - Returns  water ripple Filter.
75     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
76     * @syscap SystemCapability.Graphics.Drawing
77     * @systemapi
78     * @since 12
79     */
80    waterRipple(progress: number, waveCount: number, x: number, y: number, rippleMode: WaterRippleMode): Filter;
81
82    /**
83     * Set the fly in or fly out effect of the component.
84     *
85     * @param { number } degree - set the degree of fly in or fly out effect, value range [0, 1].
86     * @param { FlyMode } flyMode - set the location of stretching when fly in or out
87     * If the value is 0, the component keep same, else the value is 1, component are fully fly out or fly in.
88     * @returns { Filter } - Returns  fly in fly out Filter.
89     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
90     * @syscap SystemCapability.Graphics.Drawing
91     * @systemapi
92     * @since 12
93     */
94    flyInFlyOutEffect(degree: number, flyMode: FlyMode): Filter;
95
96    /**
97     * Set distort effect of the component.
98     *
99     * @param { number } distortionK - set the degree of distort effect, value range [-1, 1].
100     * If the value is 0, the component keep same,
101     * if the value is less than 0, the component is barrel distortion,
102     * if the value is more than 0, the component is pincushion distortion.
103     * @returns { Filter } - Returns distort Filter.
104     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
105     * @syscap SystemCapability.Graphics.Drawing
106     * @systemapi
107     * @since 13
108     */
109    distort(distortionK: number): Filter;
110
111    /**
112     * Adds the content radius gradient blurring effect for the current component. The input parameter is the blurring radius.
113     *
114     * @param { number } radius - the blurring radius.
115     * The larger the blurring radius, the more blurring the content, and if the value is 0, the content blurring effect is not blurring.
116     * @param { LinearGradientBlurOptions } gradientParam - the radius gradient blur options.
117     * @returns { Filter } - Returns radius gradient blur Filter.
118     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
119     * @syscap SystemCapability.Graphics.Drawing
120     * @systemapi
121     * @since 19
122     */
123    radiusGradientBlur(radius: number, gradientParam: LinearGradientBlurOptions): Filter;
124
125    /**
126     * Sets the deformation effect controlled by bezier curves of the component.
127     *
128     * @param { Array<common2D.Point> } controlPoints - The bezier control points, 12 points needed.
129     * @returns { Filter } - Returns the Filter that the current effect have been added.
130     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
131     * @syscap SystemCapability.Graphics.Drawing
132     * @systemapi
133     * @since 20
134     */
135    bezierWarp(controlPoints: Array<common2D.Point>): Filter;
136
137    /**
138     * Sets the content light filter.
139     *
140     * @param { common2D.Point3d } lightPosition
141     * @param { common2D.Color } lightColor
142     * @param { number } lightIntensity
143     * @param { Mask } [displacementMap]
144     * @returns { Filter } - Returns the Filter that the current effect have been added.
145     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
146     * @syscap SystemCapability.Graphics.Drawing
147     * @systemapi
148     * @since 20
149     */
150    contentLight(lightPosition: common2D.Point3d, lightColor: common2D.Color, lightIntensity: number,
151      displacementMap?: Mask): Filter;
152
153    /**
154     * Sets the color gradient filter, may blend with alpha mask.
155     *
156     * @param { Array<Color> } colors
157     * @param { Array<common2D.Point> } positions
158     * @param { Array<number> } strengths
159     * @param { Mask } [alphaMask]
160     * @returns { Filter } - Returns the Filter that the current effect have been added.
161     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
162     * @syscap SystemCapability.Graphics.Drawing
163     * @systemapi
164     * @since 20
165     */
166    colorGradient(colors: Array<Color>, positions: Array<common2D.Point>, strengths: Array<number>,
167        alphaMask?: Mask): Filter;
168
169    /**
170     * Detects and glows edges of contents.
171     *
172     * @param { number } alpha
173     * @param { Color } [color]
174     * @param { Mask } [mask]
175     * @param { boolean } [bloom]
176     * @returns { Filter } - Returns the Filter that the current effect have been added.
177     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
178     * @syscap SystemCapability.Graphics.Drawing
179     * @systemapi
180     * @since 20
181     */
182    edgeLight(alpha: number, color?: Color, mask?: Mask, bloom?: boolean): Filter;
183
184    /**
185     * Sets distort effect with displacement map.
186     *
187     * @param { Mask } displacementMap
188     * @param { [number, number] } [factor]
189     * @returns { Filter } - Returns the Filter that the current effect have been added.
190     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
191     * @syscap SystemCapability.Graphics.Drawing
192     * @systemapi
193     * @since 20
194     */
195    displacementDistort(displacementMap: Mask, factor?: [number, number]): Filter;
196
197    /**
198     * Sets dispersion effect with mask map.
199     *
200     * @param { Mask } dispersionMap
201     * @param { number } alpha
202     * @param { [number, number] } [rFactor]
203     * @param { [number, number] } [gFactor]
204     * @param { [number, number] } [bFactor]
205     * @returns { Filter } - Returns the Filter that the current effect have been added.
206     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
207     * @syscap SystemCapability.Graphics.Drawing
208     * @systemapi
209     * @since 20
210     */
211    maskDispersion(dispersionMap: Mask, alpha: number, rFactor?: [number, number], gFactor?: [number, number],
212      bFactor?: [number, number]): Filter;
213
214    /**
215    * Applies a high dynamic range (HDR) brightness enhancement filter to the component.
216    * @param { number } ratio - The brightness multiplier ratio (1.0 = original, >1.0 = brighter).
217    * @returns { Filter } - Returns hdr brightness Filter.
218    * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
219    * @syscap SystemCapability.Graphics.Drawing
220    * @systemapi
221    * @since 20
222    */
223    hdrBrightnessRatio(ratio: number): Filter;
224
225    /**
226     * Sets variable radius blur effect with radius map.
227     *
228     * @param { number } radius - the blurring radius.
229     * The larger the blurring radius, the more blurring the content,
230     * and if the value is 0, the content blurring effect is not blurring.
231     * @param { Mask } radiusMap - the alpha of the mask determines the degree of blurring.
232     * @returns { Filter } - Returns the Filter that the current effect have been added.
233     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
234     * @syscap SystemCapability.Graphics.Drawing
235     * @systemapi
236     * @since 20
237     */
238    variableRadiusBlur(radius: number, radiusMap: Mask): Filter;
239
240    /**
241     * Generates lighting effects from mask and directional light.
242     *
243     * @param { common2D.Point3d } direction - Direction of light
244     * @param { Color } color - Color of light
245     * @param { number } intensity - Intensity of light
246     * @param { Mask } [mask] - Mask, as a displacement map that affects lighting effects
247     * @param { number } [factor] - Mask scale factor, used to scale the mask channel values
248     * @returns { Filter } - Returns the Filter that the current effect have been added.
249     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
250     * @syscap SystemCapability.Graphics.Drawing
251     * @systemapi
252     * @since 20
253     */
254    directionLight(direction: common2D.Point3d, color: Color, intensity: number, mask?: Mask, factor?: number): Filter;
255
256    /**
257     * Applies Transition with alpha mask
258     *
259     * @param { Mask } alphaMask - Animatable mask object
260     * @param { number } [factor] - The coefficient of the mask, defaulting to 1.0f [0~1]
261     * @param { boolean } [inverse] - Transition mode, default is fasle (true, false)
262     * @returns { Filter } - Returns the Filter that the current effect have been added.
263     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
264     * @syscap SystemCapability.Graphics.Drawing
265     * @systemapi
266     * @since 20
267     */
268    maskTransition(alphaMask: Mask, factor?: number, inverse?: boolean): Filter;
269  }
270
271  /**
272   * TileMode enumeration description
273   *
274   * @enum { number }
275   * @syscap SystemCapability.Graphics.Drawing
276   * @systemapi
277   * @since 12
278   */
279  enum TileMode {
280    /**
281     * Clamp mode.
282     *
283     * @syscap SystemCapability.Graphics.Drawing
284     * @systemapi
285     * @since 12
286     */
287    CLAMP = 0,
288
289    /**
290     * Repeat mode.
291     *
292     * @syscap SystemCapability.Graphics.Drawing
293     * @systemapi
294     * @since 12
295     */
296    REPEAT = 1,
297
298    /**
299     * Mirror mode.
300     *
301     * @syscap SystemCapability.Graphics.Drawing
302     * @systemapi
303     * @since 12
304     */
305    MIRROR = 2,
306
307    /**
308     * Decal mode.
309     *
310     * @syscap SystemCapability.Graphics.Drawing
311     * @systemapi
312     * @since 12
313     */
314    DECAL = 3,
315  }
316
317  /**
318   * WaterRippleMode enumeration description
319   *
320   * @enum { number }
321   * @syscap SystemCapability.Graphics.Drawing
322   * @systemapi
323   * @since 12
324   */
325  enum WaterRippleMode {
326    /**
327     * SMALL2MEDIUM_RECV mode.
328     *
329     * @syscap SystemCapability.Graphics.Drawing
330     * @systemapi
331     * @since 12
332     */
333    SMALL2MEDIUM_RECV = 0,
334
335    /**
336     * SMALL2MEDIUM_SEND mode.
337     *
338     * @syscap SystemCapability.Graphics.Drawing
339     * @systemapi
340     * @since 12
341     */
342    SMALL2MEDIUM_SEND = 1,
343
344    /**
345     * SMALL2SMALL mode.
346     *
347     * @syscap SystemCapability.Graphics.Drawing
348     * @systemapi
349     * @since 12
350     */
351    SMALL2SMALL = 2,
352
353    /**
354     * MINI_RECV mode.
355     *
356     * @syscap SystemCapability.Graphics.Drawing
357     * @systemapi
358     * @since 17
359     */
360    MINI_RECV = 3,
361  }
362
363  /**
364   * FlyMode enumeration description
365   *
366   * @enum { number }
367   * @syscap SystemCapability.Graphics.Drawing
368   * @systemapi
369   * @since 12
370   */
371  enum FlyMode {
372    /**
373     * BOTTOM fly mode.
374     *
375     * @syscap SystemCapability.Graphics.Drawing
376     * @systemapi
377     * @since 12
378     */
379    BOTTOM = 0,
380
381    /**
382     * TOP fly mode.
383     *
384     * @syscap SystemCapability.Graphics.Drawing
385     * @systemapi
386     * @since 12
387     */
388    TOP = 1,
389  }
390
391  /**
392   * The VisualEffect of Component.
393   * @typedef VisualEffect
394   * @syscap SystemCapability.Graphics.Drawing
395   * @since arkts {'1.1':'12', '1.2':'20'}
396   * @arkts 1.1&1.2
397   */
398  interface VisualEffect {
399    /**
400    * A backgroundColorEffect effect is added to the Component.
401    * @param { BrightnessBlender } blender - The blender to blend backgroundColor.
402    * @returns { VisualEffect } VisualEffects for the current effect have been added.
403    * @syscap SystemCapability.Graphics.Drawing
404    * @systemapi
405    * @since arkts {'1.1':'12', '1.2':'20'}
406    * @arkts 1.1&1.2
407    */
408    backgroundColorBlender(blender: BrightnessBlender): VisualEffect;
409
410    /**
411     * Sets the border light effect.
412     *
413     * @param { common2D.Point3d } lightPosition
414     * @param { common2D.Color } lightColor
415     * @param { number } lightIntensity
416     * @param { number } borderWidth
417     * @returns { VisualEffect } - Returns the VisualEffect that the current effect have been added.
418     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
419     * @syscap SystemCapability.Graphics.Drawing
420     * @systemapi
421     * @since 20
422     */
423    borderLight(lightPosition: common2D.Point3d, lightColor: common2D.Color, lightIntensity: number,
424      borderWidth: number): VisualEffect;
425
426    /**
427     * Sets the color gradient effect, may blend with alpha mask.
428     *
429     * @param { Array<Color> } colors - array of colors.
430     * @param { Array<common2D.Point> } positions - the centers of colors.
431     * @param { Array<number> } strengths - the weights of color Mixing.
432     * @param { Mask } [alphaMask] - the mask determines the alpha of the effect.
433     * @returns { VisualEffect } - Returns the VisualEffect that the current effect have been added.
434     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
435     * @syscap SystemCapability.Graphics.Drawing
436     * @systemapi
437     * @since 20
438     */
439    colorGradient(colors: Array<Color>, positions: Array<common2D.Point>, strengths: Array<number>,
440      alphaMask?: Mask): VisualEffect;
441  }
442
443  /**
444   * Defines the blending effect.
445   * @typedef { BrightnessBlender }
446   * @syscap SystemCapability.Graphics.Drawing
447   * @systemapi
448   * @since 13
449   */
450  /**
451   * Defines the blending effect.
452   * @typedef { BrightnessBlender | HdrBrightnessBlender }
453   * @syscap SystemCapability.Graphics.Drawing
454   * @systemapi
455   * @since arkts {'1.1':'20', '1.2':'20'}
456   * @arkts 1.1&1.2
457   */
458  type Blender = BrightnessBlender | HdrBrightnessBlender;
459
460  /**
461   * The Blender of backgroundColorEffect.
462   * @typedef BrightnessBlender
463   * @syscap SystemCapability.Graphics.Drawing
464   * @systemapi
465   * @since arkts {'1.1':'12', '1.2':'20'}
466   * @arkts 1.1&1.2
467   */
468  interface BrightnessBlender {
469    /**
470     * Defines third-order rate for grayscale adjustment.
471     *
472     * @type { number }
473     * @syscap SystemCapability.Graphics.Drawing
474     * @systemapi
475     * @since arkts {'1.1':'12', '1.2':'20'}
476     * @arkts 1.1&1.2
477     */
478    cubicRate: number;
479
480    /**
481     * Defines second-order rate for grayscale adjustment.
482     *
483     * @type { number }
484     * @syscap SystemCapability.Graphics.Drawing
485     * @systemapi
486     * @since arkts {'1.1':'12', '1.2':'20'}
487     * @arkts 1.1&1.2
488     */
489    quadraticRate: number;
490
491    /**
492     * Defines linear rate for grayscale adjustment.
493     *
494     * @type { number }
495     * @syscap SystemCapability.Graphics.Drawing
496     * @systemapi
497     * @since arkts {'1.1':'12', '1.2':'20'}
498     * @arkts 1.1&1.2
499     */
500    linearRate: number;
501
502    /**
503     * Defines grayscale adjustment degree.
504     *
505     * @type { number }
506     * @syscap SystemCapability.Graphics.Drawing
507     * @systemapi
508     * @since arkts {'1.1':'12', '1.2':'20'}
509     * @arkts 1.1&1.2
510     */
511    degree: number;
512
513    /**
514     * Defines the reference saturation for brightness.
515     *
516     * @type { number }
517     * @syscap SystemCapability.Graphics.Drawing
518     * @systemapi
519     * @since arkts {'1.1':'12', '1.2':'20'}
520     * @arkts 1.1&1.2
521     */
522    saturation: number;
523
524    /**
525     * Defines the positive adjustment coefficients in RGB channels based on the reference saturation.
526     *
527     * @type { [number, number, number] }
528     * @syscap SystemCapability.Graphics.Drawing
529     * @systemapi
530     * @since arkts {'1.1':'12', '1.2':'20'}
531     * @arkts 1.1&1.2
532     */
533    positiveCoefficient: [number, number, number];
534
535    /**
536     * Defines the negative adjustment coefficients in RGB channels based on the reference saturation.
537     *
538     * @type { [number, number, number] }
539     * @syscap SystemCapability.Graphics.Drawing
540     * @systemapi
541     * @since arkts {'1.1':'12', '1.2':'20'}
542     * @arkts 1.1&1.2
543     */
544    negativeCoefficient: [number, number, number];
545
546    /**
547     * Defines the blending fraction for brightness effect.
548     *
549     * @type { number }
550     * @syscap SystemCapability.Graphics.Drawing
551     * @systemapi
552     * @since arkts {'1.1':'12', '1.2':'20'}
553     * @arkts 1.1&1.2
554     */
555    fraction: number;
556  }
557
558  /**
559   * The HDR enabled Blender of backgroundColorEffect.
560   * @extends BrightnessBlender
561   * @typedef HdrBrightnessBlender
562   * @syscap SystemCapability.Graphics.Drawing
563   * @systemapi
564   * @since 20
565   * @arkts 1.1&1.2
566   */
567  interface HdrBrightnessBlender extends BrightnessBlender {}
568
569  /**
570   * The Color of Light.
571   * @typedef Color
572   * @syscap SystemCapability.Graphics.Drawing
573   * @systemapi
574   * @since 20
575   */
576  interface Color {
577    /**
578     * Red component of color.
579     * @type { number }
580     * @syscap SystemCapability.Graphics.Drawing
581     * @systemapi
582     * @since 20
583     */
584    red: number;
585    /**
586     * Green component of color.
587     * @type { number }
588     * @syscap SystemCapability.Graphics.Drawing
589     * @systemapi
590     * @since 20
591     */
592    green: number;
593    /**
594     * Blue component of color
595     * @type { number }
596     * @syscap SystemCapability.Graphics.Drawing
597     * @systemapi
598     * @since 20
599     */
600    blue: number;
601    /**
602     * Alpha component of color.
603     * @type { number }
604     * @syscap SystemCapability.Graphics.Drawing
605     * @systemapi
606     * @since 20
607     */
608    alpha: number;
609  }
610
611  /**
612   * Defines the mask for Filter or VisualEffect.
613   * @typedef { Mask }
614   * @syscap SystemCapability.Graphics.Drawing
615   * @systemapi
616   * @since 20
617   */
618  class Mask {
619    /**
620     * Create a Mask of ripple.
621     * @param { common2D.Point } center
622     * @param { number } radius
623     * @param { number } width
624     * @param { number } [offset]
625     * @returns { Mask }
626     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
627     * @static
628     * @syscap SystemCapability.Graphics.Drawing
629     * @systemapi
630     * @since 20
631     */
632    static createRippleMask(center: common2D.Point, radius: number, width: number, offset?: number): Mask;
633
634    /**
635     * Create a Mask of pixelmap.
636     * @param { image.PixelMap } pixelMap
637     * @param { common2D.Rect } srcRect
638     * @param { common2D.Rect } dstRect
639     * @param { Color } [fillColor]
640     * @returns { Mask }
641     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
642     * @static
643     * @syscap SystemCapability.Graphics.Drawing
644     * @systemapi
645     * @since 20
646     */
647    static createPixelMapMask(pixelMap: image.PixelMap, srcRect: common2D.Rect, dstRect: common2D.Rect,
648      fillColor?: Color): Mask;
649
650    /**
651     * Create a Mask of radial gradient.
652     * @param { common2D.Point } center
653     * @param { number } radiusX
654     * @param { number } radiusY
655     * @param { Array<[number, number]> } gradients
656     * @returns { Mask }
657     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
658     * @static
659     * @syscap SystemCapability.Graphics.Drawing
660     * @systemapi
661     * @since 20
662     */
663    static createRadialGradientMask(center: common2D.Point, radiusX: number, radiusY: number,
664      gradients: Array<[number, number]>): Mask;
665
666    /**
667     * Create a Mask of single wave gradient.
668     * @param { common2D.Point } center - The wave source center of the single-wave mask.
669     * @param { number } width - The circular ring width of the single-wave mask.
670     * @param { number } propagationRadius - The outer diffusion radius of the single-wave mask.
671     * @param { number } blurRadius - The blur radius of the single-wave mask.
672     * @param { number } [turbulenceStrength] - The turbulent displacement intensity of the single-wave mask.
673     * @returns { Mask } - Returns wave gradient mask.
674     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
675     * @static
676     * @syscap SystemCapability.Graphics.Drawing
677     * @systemapi
678     * @since 20
679     */
680    static createWaveGradientMask(center: common2D.Point, width: number, propagationRadius: number,
681      blurRadius: number, turbulenceStrength?: number): Mask;
682  }
683
684  /**
685   * Create a Filter to add multiple effects to the component.
686   * @returns { Filter } Returns the head node of Filter.
687   * @syscap SystemCapability.Graphics.Drawing
688   * @since 12
689   */
690  function createFilter(): Filter;
691
692  /**
693   * Create a VisualEffect to add multiple effects to the component.
694   * @returns { VisualEffect } Returns the head node of visualEffect.
695   * @syscap SystemCapability.Graphics.Drawing
696   * @since arkts {'1.1':'12', '1.2':'20'}
697   * @arkts 1.1&1.2
698   */
699  function createEffect(): VisualEffect;
700
701  /**
702   * Create a BrightnessBlender to add BrightnessBlender to the component.
703   * @param { BrightnessBlenderParam } param - The brightness blender parameters.
704   * @returns { BrightnessBlender } Returns the blender.
705   * @syscap SystemCapability.Graphics.Drawing
706   * @systemapi
707   * @since arkts {'1.1':'12', '1.2':'20'}
708   * @arkts 1.1&1.2
709   */
710  function createBrightnessBlender(param: BrightnessBlenderParam): BrightnessBlender;
711
712  /**
713   * Create a HdrBrightnessBlender to add HdrBrightnessBlender to the component.
714   * @param { BrightnessBlenderParam } param - The brightness blender parameters.
715   * @returns { HdrBrightnessBlender } Returns the blender.
716   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
717   * @syscap SystemCapability.Graphics.Drawing
718   * @systemapi
719   * @since 20
720   * @arkts 1.1&1.2
721   */
722  function createHdrBrightnessBlender(param: BrightnessBlenderParam): HdrBrightnessBlender;
723}
724
725/**
726 * The parameters of brightness blender.
727 * @typedef BrightnessBlenderParam
728 * @syscap SystemCapability.Graphics.Drawing
729 * @systemapi
730 * @since arkts {'1.1':'12', '1.2':'20'}
731 * @arkts 1.1&1.2
732 */
733declare interface BrightnessBlenderParam {
734  /**
735   * Defines third-order rate for grayscale adjustment.
736   *
737   * @type { number }
738   * @syscap SystemCapability.Graphics.Drawing
739   * @systemapi
740   * @since arkts {'1.1':'12', '1.2':'20'}
741   * @arkts 1.1&1.2
742   */
743  cubicRate: number;
744
745  /**
746   * Defines second-order rate for grayscale adjustment.
747   *
748   * @type { number }
749   * @syscap SystemCapability.Graphics.Drawing
750   * @systemapi
751   * @since arkts {'1.1':'12', '1.2':'20'}
752   * @arkts 1.1&1.2
753   */
754  quadraticRate: number;
755
756  /**
757   * Defines linear rate for grayscale adjustment.
758   *
759   * @type { number }
760   * @syscap SystemCapability.Graphics.Drawing
761   * @systemapi
762   * @since arkts {'1.1':'12', '1.2':'20'}
763   * @arkts 1.1&1.2
764   */
765  linearRate: number;
766
767  /**
768   * Defines grayscale adjustment degree.
769   *
770   * @type { number }
771   * @syscap SystemCapability.Graphics.Drawing
772   * @systemapi
773   * @since arkts {'1.1':'12', '1.2':'20'}
774   * @arkts 1.1&1.2
775   */
776  degree: number;
777
778  /**
779   * Defines the reference saturation for brightness.
780   *
781   * @type { number }
782   * @syscap SystemCapability.Graphics.Drawing
783   * @systemapi
784   * @since arkts {'1.1':'12', '1.2':'20'}
785   * @arkts 1.1&1.2
786   */
787  saturation: number;
788
789  /**
790   * Defines the positive adjustment coefficients in RGB channels based on the reference saturation.
791   *
792   * @type { [number, number, number] }
793   * @syscap SystemCapability.Graphics.Drawing
794   * @systemapi
795   * @since arkts {'1.1':'12', '1.2':'20'}
796   * @arkts 1.1&1.2
797   */
798  positiveCoefficient: [number, number, number];
799
800  /**
801   * Defines the negative adjustment coefficients in RGB channels based on the reference saturation.
802   *
803   * @type { [number, number, number] }
804   * @syscap SystemCapability.Graphics.Drawing
805   * @systemapi
806   * @since arkts {'1.1':'12', '1.2':'20'}
807   * @arkts 1.1&1.2
808   */
809  negativeCoefficient: [number, number, number];
810
811  /**
812   * Defines the blending fraction for brightness effect.
813   *
814   * @type { number }
815   * @syscap SystemCapability.Graphics.Drawing
816   * @systemapi
817   * @since arkts {'1.1':'12', '1.2':'20'}
818   * @arkts 1.1&1.2
819   */
820  fraction: number;
821}
822
823export default uiEffect;