# lv_draw_arc.h (/api/draw/lv_draw_arc_h)



<ApiSummary functions="4" structs="1" />

Functions [#functions]

<ApiTabs items="[&#x22;Getters (2)&#x22;,&#x22;Other (2)&#x22;]">
  <ApiTab value="Getters (2)">
    <ApiMember kind="function" name="lv_draw_task_get_arc_dsc" file="draw/lv_draw_arc.h" line="78" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/lv_draw_arc.h#L78">
      lv_draw_task_get_arc_dsc [#lv_draw_task_get_arc_dsc]

      Try to get an arc draw descriptor from a draw task.

      ```c title=" " lineNumbers=1
      lv_draw_arc_dsc_t * lv_draw_task_get_arc_dsc(lv_draw_task_t *task)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name   | Type                                                         | Description |
      | ------ | ------------------------------------------------------------ | ----------- |
      | `task` | <ApiLink name="lv_draw_task_t" display="lv_draw_task_t *" /> | draw task   |

      **Returns:** <ApiLink name="lv_draw_arc_dsc_t" display="lv_draw_arc_dsc_t *" /> — the task's draw descriptor or NULL if the task is not of type LV\_DRAW\_TASK\_TYPE\_ARC
    </ApiMember>

    <ApiMember kind="function" name="lv_draw_arc_get_area" file="draw/lv_draw_arc.h" line="98" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/lv_draw_arc.h#L98">
      lv_draw_arc_get_area [#lv_draw_arc_get_area]

      Get an area the should be invalidated when the arcs angle changed between start\_angle and end\_ange

      ```c title=" " lineNumbers=1
      void lv_draw_arc_get_area(int32_t x, int32_t y, uint16_t radius, lv_value_precise_t start_angle, lv_value_precise_t end_angle, int32_t w, bool rounded, lv_area_t *area)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name          | Type                                               | Description                                                           |
      | ------------- | -------------------------------------------------- | --------------------------------------------------------------------- |
      | `x`           | <ApiLink name="int32_t" />                         | the x coordinate of the center of the arc                             |
      | `y`           | <ApiLink name="int32_t" />                         | the y coordinate of the center of the arc                             |
      | `radius`      | <ApiLink name="uint16_t" />                        | the radius of the arc                                                 |
      | `start_angle` | <ApiLink name="lv_value_precise_t" />              | the start angle of the arc (0 deg on the bottom, 90 deg on the right) |
      | `end_angle`   | <ApiLink name="lv_value_precise_t" />              | the end angle of the arc                                              |
      | `w`           | <ApiLink name="int32_t" />                         | width of the arc                                                      |
      | `rounded`     | <ApiLink name="bool" />                            | true: the arc is rounded                                              |
      | `area`        | <ApiLink name="lv_area_t" display="lv_area_t *" /> | store the area to invalidate here                                     |
    </ApiMember>
  </ApiTab>

  <ApiTab value="Other (2)">
    <ApiMember kind="function" name="lv_draw_arc_dsc_init" file="draw/lv_draw_arc.h" line="71" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/lv_draw_arc.h#L71">
      lv_draw_arc_dsc_init [#lv_draw_arc_dsc_init]

      Initialize an arc draw descriptor.

      ```c title=" " lineNumbers=1
      void lv_draw_arc_dsc_init(lv_draw_arc_dsc_t *dsc)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                                               | Description                  |
      | ----- | ------------------------------------------------------------------ | ---------------------------- |
      | `dsc` | <ApiLink name="lv_draw_arc_dsc_t" display="lv_draw_arc_dsc_t *" /> | pointer to a draw descriptor |
    </ApiMember>

    <ApiMember kind="function" name="lv_draw_arc" file="draw/lv_draw_arc.h" line="85" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/lv_draw_arc.h#L85">
      lv_draw_arc [#lv_draw_arc]

      Create an arc draw task.

      ```c title=" " lineNumbers=1
      void lv_draw_arc(lv_layer_t *layer, const lv_draw_arc_dsc_t *dsc)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name    | Type                                                                     | Description                                        |
      | ------- | ------------------------------------------------------------------------ | -------------------------------------------------- |
      | `layer` | <ApiLink name="lv_layer_t" display="lv_layer_t *" />                     | pointer to a layer                                 |
      | `dsc`   | <ApiLink name="lv_draw_arc_dsc_t" display="const lv_draw_arc_dsc_t *" /> | pointer to an initialized draw descriptor variable |
    </ApiMember>
  </ApiTab>
</ApiTabs>

Structs [#structs]

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

  | Member        | Type                                  | Description                                                                                                                                               |
  | ------------- | ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `base`        | <ApiLink name="lv_draw_dsc_base_t" /> |                                                                                                                                                           |
  | `color`       | <ApiLink name="lv_color_t" />         | The color of the arc                                                                                                                                      |
  | `width`       | <ApiLink name="int32_t" />            | The width (thickness) of the arc                                                                                                                          |
  | `start_angle` | <ApiLink name="lv_value_precise_t" /> | The start angle in 1 degree units (if `LV_USE_FLOAT` is enabled a float number can be also used) 0° is the 3 o'clock position, 90° is the 6 o'clock, etc. |
  | `end_angle`   | <ApiLink name="lv_value_precise_t" /> | The end angle, similarly to start\_angle.                                                                                                                 |
  | `center`      | <ApiLink name="lv_point_t" />         | The center point of the arc.                                                                                                                              |
  | `img_src`     | `const void *`                        | An image source to be used instead of `color`. `NULL` if unused                                                                                           |
  | `radius`      | <ApiLink name="uint16_t" />           | The outer radius of the arc                                                                                                                               |
  | `opa`         | <ApiLink name="lv_opa_t" />           | Opacity of the arc in 0...255 range. LV\_OPA\_TRANSP, LV\_OPA\_10, LV\_OPA\_20, .. LV\_OPA\_COVER can be used as well                                     |
  | `rounded`     | <ApiLink name="uint8_t" />            | 1: Make the arc ends rounded                                                                                                                              |
</ApiMember>

<TypeUsedBy name="lv_draw_arc_dsc_t" count="10">
  * `lv_obj_init_draw_arc_dsc` — param `draw_dsc`
  * `lv_draw_eve_arc` — param `dsc`
  * `lv_draw_arc_dsc_init` — param `dsc`
  * `lv_draw_arc` — param `dsc`
  * `lv_draw_nanovg_arc` — param `dsc`
  * `lv_draw_nema_gfx_arc` — param `dsc`
  * `lv_draw_dave2d_arc` — param `dsc`
  * `lv_draw_sdl_arc` — param `dsc`
  * `lv_draw_sw_arc` — param `dsc`
  * `lv_draw_vg_lite_arc` — param `dsc`
</TypeUsedBy>

Dependencies [#dependencies]

<FileIncludes includes="[&#x22;lv_draw.h&#x22;, &#x22;lv_conf_internal.h&#x22;, &#x22;lv_color.h&#x22;, &#x22;lv_area.h&#x22;, &#x22;lv_style.h&#x22;]" includedBy="[&#x22;lv_obj_draw.h&#x22;, &#x22;lv_draw_eve_private.h&#x22;, &#x22;lv_draw_nanovg_private.h&#x22;, &#x22;lv_draw_nema_gfx.h&#x22;, &#x22;lv_draw_dave2d.h&#x22;, &#x22;lv_draw_sdl.h&#x22;, &#x22;lv_draw_sw.h&#x22;, &#x22;lv_draw_vg_lite.h&#x22;]" transitiveIncludes="[&#x22;lv_anim.h&#x22;, &#x22;lv_array.h&#x22;, &#x22;lv_assert.h&#x22;, &#x22;lv_bidi.h&#x22;, &#x22;lv_color_op.h&#x22;, &#x22;lv_conf_kconfig.h&#x22;, &#x22;lv_draw_buf.h&#x22;, &#x22;lv_event.h&#x22;, &#x22;lv_ext_data.h&#x22;, &#x22;lv_flex.h&#x22;, &#x22;lv_font.h&#x22;, &#x22;lv_fs.h&#x22;, &#x22;lv_grad.h&#x22;, &#x22;lv_grid.h&#x22;, &#x22;lv_image_decoder.h&#x22;, &#x22;lv_image_dsc.h&#x22;, &#x22;lv_layout.h&#x22;, &#x22;lv_ll.h&#x22;, &#x22;lv_log.h&#x22;, &#x22;lv_math.h&#x22;, &#x22;lv_matrix.h&#x22;, &#x22;lv_mem.h&#x22;, &#x22;lv_palette.h&#x22;, &#x22;lv_profiler.h&#x22;, &#x22;lv_profiler_builtin.h&#x22;, &#x22;lv_sprintf.h&#x22;, &#x22;lv_string.h&#x22;, &#x22;lv_style_gen.h&#x22;, &#x22;lv_symbol_def.h&#x22;, &#x22;lv_text.h&#x22;, &#x22;lv_tick.h&#x22;, &#x22;lv_timer.h&#x22;, &#x22;lv_types.h&#x22;]" />
