# lv_draw_sw_mask_private.h (/api/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="draw/sw/lv_draw_sw_mask_private.h" line="145" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/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`            | <ApiLink name="uint8_t" display="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`   | <ApiLink name="uint16_t" display="uint16_t *" /> | The x coordinate of the circle for each y value         |
  | `opa_start_on_y` | <ApiLink name="uint16_t" display="uint16_t *" /> | The index of `cir_opa` for each y value                 |
  | `life`           | <ApiLink name="int32_t" />                       | How many times the entry way used                       |
  | `used_cnt`       | <ApiLink name="uint32_t" />                      | Like a semaphore to count the referencing masks         |
  | `radius`         | <ApiLink name="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` | <ApiLink name="int32_t" />                                                                      | X / (1024\*Y) steepness (X is 0..1023 range). What is the change of X in 1024 Y?                |
  | `yx_steep` | <ApiLink name="int32_t" />                                                                      | Y / (1024\*X) steepness (Y is 0..1023 range). What is the change of Y in 1024 X?                |
  | `steep`    | <ApiLink name="int32_t" />                                                                      | Helper which stores yx\_steep for flat lines and xy\_steep for steep (non flat) lines           |
  | `spx`      | <ApiLink name="int32_t" />                                                                      | Steepness in 1 px in 0..255 range. Used only by flat lines.                                     |
  | `flat`     | <ApiLink name="uint8_t" />                                                                      | 1: It's a flat line? (Near to horizontal)                                                       |
  | `inv`      | <ApiLink name="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` | <ApiLink name="int32_t" />                                                                        |                                                 |
  | `end_angle`   | <ApiLink name="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`   | <ApiLink name="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` | <ApiLink name="int32_t" />                                                                             |                                                 |
  | `outer`  | <ApiLink name="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`      | <ApiLink name="int32_t" />                                                                      |                                                 |
  | `y_bottom`   | <ApiLink name="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="draw/sw/lv_draw_sw_mask_private.h" line="135" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/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;]" transitiveIncludes="[&#x22;lv_area.h&#x22;, &#x22;lv_assert.h&#x22;, &#x22;lv_color.h&#x22;, &#x22;lv_color_op.h&#x22;, &#x22;lv_conf_internal.h&#x22;, &#x22;lv_conf_kconfig.h&#x22;, &#x22;lv_log.h&#x22;, &#x22;lv_math.h&#x22;, &#x22;lv_mem.h&#x22;, &#x22;lv_palette.h&#x22;, &#x22;lv_string.h&#x22;, &#x22;lv_types.h&#x22;]" />
