# lv_draw_sw_arm2d.h (/api/draw/sw/arm2d/lv_draw_sw_arm2d_h)



<ApiSummary functions="6" macros="7" variables="1" />

Functions [#functions]

<ApiMember kind="function" name="arm_2d_helper_swap_rgb16" file="draw/sw/arm2d/lv_draw_sw_arm2d.h" line="93" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/sw/arm2d/lv_draw_sw_arm2d.h#L93">
  arm_2d_helper_swap_rgb16 [#arm_2d_helper_swap_rgb16]

  ```c title=" " lineNumbers=1
  void arm_2d_helper_swap_rgb16(uint16_t *phwBuffer, uint32_t wCount)
  ```

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

  | Name        | Type                                             |
  | ----------- | ------------------------------------------------ |
  | `phwBuffer` | <ApiLink name="uint16_t" display="uint16_t *" /> |
  | `wCount`    | <ApiLink name="uint32_t" />                      |
</ApiMember>

<ApiMember kind="function" name="lv_draw_sw_rgb565_swap_helium" file="draw/sw/arm2d/lv_draw_sw_arm2d.h" line="167" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/sw/arm2d/lv_draw_sw_arm2d.h#L167">
  lv_draw_sw_rgb565_swap_helium [#lv_draw_sw_rgb565_swap_helium]

  ```c title=" " lineNumbers=1
  static lv_result_t lv_draw_sw_rgb565_swap_helium(void *buf, uint32_t buf_size_px)
  ```

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

  | Name          | Type                        |
  | ------------- | --------------------------- |
  | `buf`         | `void *`                    |
  | `buf_size_px` | <ApiLink name="uint32_t" /> |
</ApiMember>

<ApiMember kind="function" name="lv_draw_sw_image_helium" file="draw/sw/arm2d/lv_draw_sw_arm2d.h" line="173" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/sw/arm2d/lv_draw_sw_arm2d.h#L173">
  lv_draw_sw_image_helium [#lv_draw_sw_image_helium]

  \< Fully transparent if opa \<= LV\_OPA\_MIN

  \< Log if something unwanted happened but didn't caused problem.

  \< Log if something unwanted happened but didn't caused problem.

  \< Log only critical issues, when system may fail.

  \< Halt by default

  \< Fully cover if opa >= LV\_OPA\_MAX

  \< Log only critical issues, when system may fail.

  \< Halt by default

  \< Fully cover if opa >= LV\_OPA\_MAX

  ```c title=" " lineNumbers=1
  static lv_result_t lv_draw_sw_image_helium(bool is_transform, lv_color_format_t src_cf, const uint8_t *src_buf, const lv_area_t *coords, int32_t src_stride, const lv_area_t *des_area, lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc)
  ```

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

  | Name           | Type                                                                         |
  | -------------- | ---------------------------------------------------------------------------- |
  | `is_transform` | <ApiLink name="bool" />                                                      |
  | `src_cf`       | <ApiLink name="lv_color_format_t" />                                         |
  | `src_buf`      | <ApiLink name="uint8_t" display="const uint8_t *" />                         |
  | `coords`       | <ApiLink name="lv_area_t" display="const lv_area_t *" />                     |
  | `src_stride`   | <ApiLink name="int32_t" />                                                   |
  | `des_area`     | <ApiLink name="lv_area_t" display="const lv_area_t *" />                     |
  | `t`            | <ApiLink name="lv_draw_task_t" display="lv_draw_task_t *" />                 |
  | `draw_dsc`     | <ApiLink name="lv_draw_image_dsc_t" display="const lv_draw_image_dsc_t *" /> |
</ApiMember>

<ApiMember kind="function" name="while" file="draw/sw/arm2d/lv_draw_sw_arm2d.h" line="613" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/sw/arm2d/lv_draw_sw_arm2d.h#L613">
  while [#while]

  ```c title=" " lineNumbers=1
  while(0)
  ```

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

  | Name | Type |
  | ---- | ---- |
  | \`\` | `0`  |
</ApiMember>

<ApiMember kind="function" name="lv_draw_sw_image_recolor_rgb565" file="draw/sw/arm2d/lv_draw_sw_arm2d.h" line="618" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/sw/arm2d/lv_draw_sw_arm2d.h#L618">
  lv_draw_sw_image_recolor_rgb565 [#lv_draw_sw_image_recolor_rgb565]

  ```c title=" " lineNumbers=1
  static lv_result_t lv_draw_sw_image_recolor_rgb565(const uint8_t *src_buf, const lv_area_t *blend_area, lv_color_t color, lv_opa_t opa)
  ```

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

  | Name         | Type                                                     |
  | ------------ | -------------------------------------------------------- |
  | `src_buf`    | <ApiLink name="uint8_t" display="const uint8_t *" />     |
  | `blend_area` | <ApiLink name="lv_area_t" display="const lv_area_t *" /> |
  | `color`      | <ApiLink name="lv_color_t" />                            |
  | `opa`        | <ApiLink name="lv_opa_t" />                              |
</ApiMember>

<ApiMember kind="function" name="lv_draw_sw_image_recolor_rgb888" file="draw/sw/arm2d/lv_draw_sw_arm2d.h" line="642" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/sw/arm2d/lv_draw_sw_arm2d.h#L642">
  lv_draw_sw_image_recolor_rgb888 [#lv_draw_sw_image_recolor_rgb888]

  ```c title=" " lineNumbers=1
  static lv_result_t lv_draw_sw_image_recolor_rgb888(const uint8_t *src_buf, const lv_area_t *blend_area, lv_color_t color, lv_opa_t opa, lv_color_format_t src_cf)
  ```

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

  | Name         | Type                                                     |
  | ------------ | -------------------------------------------------------- |
  | `src_buf`    | <ApiLink name="uint8_t" display="const uint8_t *" />     |
  | `blend_area` | <ApiLink name="lv_area_t" display="const lv_area_t *" /> |
  | `color`      | <ApiLink name="lv_color_t" />                            |
  | `opa`        | <ApiLink name="lv_opa_t" />                              |
  | `src_cf`     | <ApiLink name="lv_color_format_t" />                     |
</ApiMember>

Macros [#macros]

<ApiMember kind="macro" name="__ARM_2D_IMPL__" file="draw/sw/arm2d/lv_draw_sw_arm2d.h" line="26" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/sw/arm2d/lv_draw_sw_arm2d.h#L26">
  **ARM_2D_IMPL** [#arm_2d_impl]

  ```c title=" " lineNumbers=1
  #define __ARM_2D_IMPL__
  ```
</ApiMember>

<ApiMember kind="macro" name="LV_DRAW_SW_RGB565_SWAP" file="draw/sw/arm2d/lv_draw_sw_arm2d.h" line="42" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/sw/arm2d/lv_draw_sw_arm2d.h#L42">
  LV_DRAW_SW_RGB565_SWAP [#lv_draw_sw_rgb565_swap]

  ```c title=" " lineNumbers=1
  #define LV_DRAW_SW_RGB565_SWAP(__buf_ptr, __buf_size_px) \
      lv_draw_sw_rgb565_swap_helium((__buf_ptr), (__buf_size_px))
  ```
</ApiMember>

<ApiMember kind="macro" name="LV_DRAW_SW_IMAGE" file="draw/sw/arm2d/lv_draw_sw_arm2d.h" line="54" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/sw/arm2d/lv_draw_sw_arm2d.h#L54">
  LV_DRAW_SW_IMAGE [#lv_draw_sw_image]

  ```c title=" " lineNumbers=1
  #define LV_DRAW_SW_IMAGE(__transformed, __cf, __src_buf, __img_coords, __src_stride, __blend_area, __draw_task, __draw_dsc) \
      lv_draw_sw_image_helium(   (__transformed), \
                                          (__cf), \
                                          (uint8_t *)(__src_buf), \
                                          (__img_coords), \
                                          (__src_stride), \
                                          (__blend_area), \
                                          (__draw_task), \
                                          (__draw_dsc))
  ```
</ApiMember>

<ApiMember kind="macro" name="LV_DRAW_SW_RGB565_RECOLOR" file="draw/sw/arm2d/lv_draw_sw_arm2d.h" line="66" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/sw/arm2d/lv_draw_sw_arm2d.h#L66">
  LV_DRAW_SW_RGB565_RECOLOR [#lv_draw_sw_rgb565_recolor]

  ```c title=" " lineNumbers=1
  #define LV_DRAW_SW_RGB565_RECOLOR(__src_buf, __blend_area, __color, __opa) \
      lv_draw_sw_image_recolor_rgb565(   (__src_buf), \
                                                  &(__blend_area), \
                                                  (__color), \
                                                  (__opa))
  ```
</ApiMember>

<ApiMember kind="macro" name="LV_DRAW_SW_RGB888_RECOLOR" file="draw/sw/arm2d/lv_draw_sw_arm2d.h" line="78" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/sw/arm2d/lv_draw_sw_arm2d.h#L78">
  LV_DRAW_SW_RGB888_RECOLOR [#lv_draw_sw_rgb888_recolor]

  ```c title=" " lineNumbers=1
  #define LV_DRAW_SW_RGB888_RECOLOR(__src_buf, __blend_area, __color, __opa, __cf) \
      lv_draw_sw_image_recolor_rgb888(   (__src_buf), \
                                                  &(__blend_area), \
                                                  (__color), \
                                                  (__opa), \
                                                  (__cf))
  ```
</ApiMember>

<ApiMember kind="macro" name="__RECOLOUR_BEGIN" file="draw/sw/arm2d/lv_draw_sw_arm2d.h" line="99" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/sw/arm2d/lv_draw_sw_arm2d.h#L99">
  \__RECOLOUR_BEGIN [#__recolour_begin]

  ```c title=" " lineNumbers=1
  #define __RECOLOUR_BEGIN()
  ```
</ApiMember>

<ApiMember kind="macro" name="__RECOLOUR_END" file="draw/sw/arm2d/lv_draw_sw_arm2d.h" line="160" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/sw/arm2d/lv_draw_sw_arm2d.h#L160">
  \__RECOLOUR_END [#__recolour_end]

  ```c title=" " lineNumbers=1
  #define __RECOLOUR_END() \
      } while(0); \
              if (NULL != rgb_tmp_buf) { \
                  lv_free(rgb_tmp_buf); \
              } \
          } while(0);
  ```
</ApiMember>

Variables [#variables]

<ApiMember kind="variable" name="result" file="draw/sw/arm2d/lv_draw_sw_arm2d.h" line="615" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/sw/arm2d/lv_draw_sw_arm2d.h#L615">
  result [#result]

  ```c title=" " lineNumbers=1
  return result
  ```
</ApiMember>

Dependencies [#dependencies]

<FileIncludes includes="[&#x22;lv_conf_internal.h&#x22;, &#x22;lv_area_private.h&#x22;, &#x22;lv_draw_private.h&#x22;, &#x22;lv_draw_image_private.h&#x22;, &#x22;arm_2d.h&#x22;, &#x22;__arm_2d_impl.h&#x22;]" transitiveIncludes="[&#x22;lv_anim.h&#x22;, &#x22;lv_area.h&#x22;, &#x22;lv_array.h&#x22;, &#x22;lv_assert.h&#x22;, &#x22;lv_bidi.h&#x22;, &#x22;lv_cache.h&#x22;, &#x22;lv_cache_class.h&#x22;, &#x22;lv_cache_entry.h&#x22;, &#x22;lv_cache_instance.h&#x22;, &#x22;lv_cache_lru_ll.h&#x22;, &#x22;lv_cache_lru_rb.h&#x22;, &#x22;lv_cache_private.h&#x22;, &#x22;lv_cache_sc_da.h&#x22;, &#x22;lv_color.h&#x22;, &#x22;lv_color_op.h&#x22;, &#x22;lv_conf_kconfig.h&#x22;, &#x22;lv_draw.h&#x22;, &#x22;lv_draw_buf.h&#x22;, &#x22;lv_draw_image.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_cache.h&#x22;, &#x22;lv_image_decoder.h&#x22;, &#x22;lv_image_dsc.h&#x22;, &#x22;lv_image_header_cache.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_os.h&#x22;, &#x22;lv_os_private.h&#x22;, &#x22;lv_palette.h&#x22;, &#x22;lv_profiler.h&#x22;, &#x22;lv_profiler_builtin.h&#x22;, &#x22;lv_pthread.h&#x22;, &#x22;lv_sprintf.h&#x22;, &#x22;lv_string.h&#x22;, &#x22;lv_style.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;]" />
