# lv_draw_sw_mask_private.h (/api/private/draw/sw/lv_draw_sw_mask_private_h)



<RelatedHeaders name="lv_draw_sw_mask.h" isPrivate="true" />

<ApiSummary functions="1" structs="7" typedefs="1" />

Functions [#functions]

<ApiMember kind="function" name="lv_draw_sw_mask_cleanup" file="private/draw/sw/lv_draw_sw_mask_private.h" line="145" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/src/draw/sw/lv_draw_sw_mask_private.h#L145">
  lv_draw_sw_mask_cleanup [#lv_draw_sw_mask_cleanup]

  Called by LVGL the rendering of a screen is ready to clean up the temporal (cache) data of the masks

  ```c title=" " lineNumbers=1
  void lv_draw_sw_mask_cleanup(void)
  ```
</ApiMember>

Structs [#structs]

<ApiMember kind="struct" name="lv_draw_sw_mask_radius_circle_dsc_t">
  lv_draw_sw_mask_radius_circle_dsc_t [#lv_draw_sw_mask_radius_circle_dsc_t]

  | Member           | Type                                             | Description                                             |
  | ---------------- | ------------------------------------------------ | ------------------------------------------------------- |
  | `buf`            | `uint8_t *`                                      |                                                         |
  | `cir_opa`        | <ApiLink name="lv_opa_t" display="lv_opa_t *" /> | Opacity of values on the circumference of an 1/4 circle |
  | `x_start_on_y`   | `uint16_t *`                                     | The x coordinate of the circle for each y value         |
  | `opa_start_on_y` | `uint16_t *`                                     | The index of `cir_opa` for each y value                 |
  | `life`           | `int32_t`                                        | How many times the entry way used                       |
  | `used_cnt`       | `uint32_t`                                       | Like a semaphore to count the referencing masks         |
  | `radius`         | `int32_t`                                        | The radius of the entry                                 |
</ApiMember>

<ApiMember kind="struct" name="_lv_draw_sw_mask_common_dsc_t">
  \_lv_draw_sw_mask_common_dsc_t [#_lv_draw_sw_mask_common_dsc_t]

  | Member | Type                                      | Description |
  | ------ | ----------------------------------------- | ----------- |
  | `cb`   | <ApiLink name="lv_draw_sw_mask_xcb_t" />  |             |
  | `type` | <ApiLink name="lv_draw_sw_mask_type_t" /> |             |
</ApiMember>

<ApiMember kind="struct" name="_lv_draw_sw_mask_line_param_t">
  \_lv_draw_sw_mask_line_param_t [#_lv_draw_sw_mask_line_param_t]

  | Member     | Type                                                                                            | Description                                                                                     |
  | ---------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
  | `dsc`      | <ApiLink name="lv_draw_sw_mask_common_dsc_t" />                                                 | The first element must be the common descriptor                                                 |
  | `p1`       | <ApiLink name="lv_point_t" />                                                                   |                                                                                                 |
  | `p2`       | <ApiLink name="lv_point_t" />                                                                   |                                                                                                 |
  | `side`     | <ApiLink name="lv_draw_sw_mask_line_side_t" />                                                  |                                                                                                 |
  | `cfg`      | <ApiLink name="_lv_draw_sw_mask_line_param_t" display="struct _lv_draw_sw_mask_line_param_t" /> |                                                                                                 |
  | `origo`    | <ApiLink name="lv_point_t" />                                                                   | A point of the line                                                                             |
  | `xy_steep` | `int32_t`                                                                                       | X / (1024\*Y) steepness (X is 0..1023 range). What is the change of X in 1024 Y?                |
  | `yx_steep` | `int32_t`                                                                                       | Y / (1024\*X) steepness (Y is 0..1023 range). What is the change of Y in 1024 X?                |
  | `steep`    | `int32_t`                                                                                       | Helper which stores yx\_steep for flat lines and xy\_steep for steep (non flat) lines           |
  | `spx`      | `int32_t`                                                                                       | Steepness in 1 px in 0..255 range. Used only by flat lines.                                     |
  | `flat`     | `uint8_t`                                                                                       | 1: It's a flat line? (Near to horizontal)                                                       |
  | `inv`      | `uint8_t`                                                                                       | Invert the mask. The default is: Keep the left part. It is used to select left/right/top/bottom |
</ApiMember>

<ApiMember kind="struct" name="_lv_draw_sw_mask_angle_param_t">
  \_lv_draw_sw_mask_angle_param_t [#_lv_draw_sw_mask_angle_param_t]

  | Member        | Type                                                                                              | Description                                     |
  | ------------- | ------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
  | `dsc`         | <ApiLink name="lv_draw_sw_mask_common_dsc_t" />                                                   | The first element must be the common descriptor |
  | `vertex_p`    | <ApiLink name="lv_point_t" />                                                                     |                                                 |
  | `start_angle` | `int32_t`                                                                                         |                                                 |
  | `end_angle`   | `int32_t`                                                                                         |                                                 |
  | `cfg`         | <ApiLink name="_lv_draw_sw_mask_angle_param_t" display="struct _lv_draw_sw_mask_angle_param_t" /> |                                                 |
  | `start_line`  | <ApiLink name="lv_draw_sw_mask_line_param_t" />                                                   |                                                 |
  | `end_line`    | <ApiLink name="lv_draw_sw_mask_line_param_t" />                                                   |                                                 |
  | `delta_deg`   | `uint16_t`                                                                                        |                                                 |
</ApiMember>

<ApiMember kind="struct" name="_lv_draw_sw_mask_radius_param_t">
  \_lv_draw_sw_mask_radius_param_t [#_lv_draw_sw_mask_radius_param_t]

  | Member   | Type                                                                                                   | Description                                     |
  | -------- | ------------------------------------------------------------------------------------------------------ | ----------------------------------------------- |
  | `dsc`    | <ApiLink name="lv_draw_sw_mask_common_dsc_t" />                                                        | The first element must be the common descriptor |
  | `rect`   | <ApiLink name="lv_area_t" />                                                                           |                                                 |
  | `radius` | `int32_t`                                                                                              |                                                 |
  | `outer`  | `uint8_t`                                                                                              | Invert the mask. 0: Keep the pixels inside.     |
  | `cfg`    | <ApiLink name="_lv_draw_sw_mask_radius_param_t" display="struct _lv_draw_sw_mask_radius_param_t" />    |                                                 |
  | `circle` | <ApiLink name="lv_draw_sw_mask_radius_circle_dsc_t" display="lv_draw_sw_mask_radius_circle_dsc_t *" /> |                                                 |
</ApiMember>

<ApiMember kind="struct" name="_lv_draw_sw_mask_fade_param_t">
  \_lv_draw_sw_mask_fade_param_t [#_lv_draw_sw_mask_fade_param_t]

  | Member       | Type                                                                                            | Description                                     |
  | ------------ | ----------------------------------------------------------------------------------------------- | ----------------------------------------------- |
  | `dsc`        | <ApiLink name="lv_draw_sw_mask_common_dsc_t" />                                                 | The first element must be the common descriptor |
  | `coords`     | <ApiLink name="lv_area_t" />                                                                    |                                                 |
  | `y_top`      | `int32_t`                                                                                       |                                                 |
  | `y_bottom`   | `int32_t`                                                                                       |                                                 |
  | `opa_top`    | <ApiLink name="lv_opa_t" />                                                                     |                                                 |
  | `opa_bottom` | <ApiLink name="lv_opa_t" />                                                                     |                                                 |
  | `cfg`        | <ApiLink name="_lv_draw_sw_mask_fade_param_t" display="struct _lv_draw_sw_mask_fade_param_t" /> |                                                 |
</ApiMember>

<ApiMember kind="struct" name="_lv_draw_sw_mask_map_param_t">
  \_lv_draw_sw_mask_map_param_t [#_lv_draw_sw_mask_map_param_t]

  | Member   | Type                                                                        | Description                                     |
  | -------- | --------------------------------------------------------------------------- | ----------------------------------------------- |
  | `dsc`    | <ApiLink name="lv_draw_sw_mask_common_dsc_t" />                             | The first element must be the common descriptor |
  | `coords` | <ApiLink name="lv_area_t" />                                                |                                                 |
  | `map`    | <ApiLink name="lv_opa_t" display="const lv_opa_t *" />                      |                                                 |
  | `cfg`    | <ApiLink name="struct" />` `<ApiLink name="_lv_draw_sw_mask_map_param_t" /> |                                                 |
</ApiMember>

Typedefs [#typedefs]

<ApiMember kind="typedef" name="lv_draw_sw_mask_radius_circle_dsc_arr_t" file="private/draw/sw/lv_draw_sw_mask_private.h" line="135" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/src/draw/sw/lv_draw_sw_mask_private.h#L135">
  lv_draw_sw_mask_radius_circle_dsc_arr_t [#lv_draw_sw_mask_radius_circle_dsc_arr_t]

  ```c title=" " lineNumbers=1
  typedef lv_draw_sw_mask_radius_circle_dsc_t lv_draw_sw_mask_radius_circle_dsc_arr_t[4]
  ```
</ApiMember>

Dependencies [#dependencies]

<FileIncludes includes="[&#x22;lv_draw_sw_mask.h&#x22;]" includedBy="[&#x22;lv_global.h&#x22;, &#x22;lvgl_private.h&#x22;]" transitiveIncludes="[&#x22;lv_blend_neon.h&#x22;, &#x22;lv_cache.h&#x22;, &#x22;lv_cache_class.h&#x22;, &#x22;lv_cache_entry.h&#x22;, &#x22;lv_cache_lru_ll.h&#x22;, &#x22;lv_cache_lru_rb.h&#x22;, &#x22;lv_cache_sc_da.h&#x22;, &#x22;lv_draw_private.h&#x22;, &#x22;lv_draw_sw.h&#x22;, &#x22;lv_draw_sw_blend.h&#x22;, &#x22;lv_draw_sw_blend_neon_to_rgb565.h&#x22;, &#x22;lv_draw_sw_blend_neon_to_rgb888.h&#x22;, &#x22;lv_image_cache.h&#x22;, &#x22;lv_iter_private.h&#x22;, &#x22;lv_os_private.h&#x22;]" />
