# lv_draw_image_private.h (/api/draw/lv_draw_image_private_h)



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

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

Functions [#functions]

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

      Get the area of a rectangle if its rotated and scaled

      ```c title=" " lineNumbers=1
      void lv_image_buf_get_transformed_area(lv_area_t *res, int32_t w, int32_t h, int32_t angle, uint16_t scale_x, uint16_t scale_y, const lv_point_t *pivot)
      ```

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

      | Name      | Type                                                       | Description                          |
      | --------- | ---------------------------------------------------------- | ------------------------------------ |
      | `res`     | <ApiLink name="lv_area_t" display="lv_area_t *" />         | store the coordinates here           |
      | `w`       | <ApiLink name="int32_t" />                                 | width of the rectangle to transform  |
      | `h`       | <ApiLink name="int32_t" />                                 | height of the rectangle to transform |
      | `angle`   | <ApiLink name="int32_t" />                                 | angle of rotation                    |
      | `scale_x` | <ApiLink name="uint16_t" />                                | zoom in x direction, (256 no zoom)   |
      | `scale_y` | <ApiLink name="uint16_t" />                                | zoom in y direction, (256 no zoom)   |
      | `pivot`   | <ApiLink name="lv_point_t" display="const lv_point_t *" /> | x,y pivot coordinates of rotation    |
    </ApiMember>
  </ApiTab>

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

      Can be used by draw units to handle the decoding and prepare everything for the actual image rendering

      ```c title=" " lineNumbers=1
      void lv_draw_image_normal_helper(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords, lv_draw_image_core_cb draw_core_cb, const lv_image_decoder_args_t *decoder_args)
      ```

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

      | Name           | Type                                                                                 | Description                                             |
      | -------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------- |
      | `t`            | <ApiLink name="lv_draw_task_t" display="lv_draw_task_t *" />                         | pointer to a draw task                                  |
      | `draw_dsc`     | <ApiLink name="lv_draw_image_dsc_t" display="const lv_draw_image_dsc_t *" />         | the draw descriptor of the image                        |
      | `coords`       | <ApiLink name="lv_area_t" display="const lv_area_t *" />                             | the absolute coordinates of the image                   |
      | `draw_core_cb` | <ApiLink name="lv_draw_image_core_cb" />                                             | a callback to perform the actual rendering              |
      | `decoder_args` | <ApiLink name="lv_image_decoder_args_t" display="const lv_image_decoder_args_t *" /> | the args passed to image decoders, or NULL for defaults |
    </ApiMember>

    <ApiMember kind="function" name="lv_draw_image_tiled_helper" file="draw/lv_draw_image_private.h" line="64" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/draw/lv_draw_image_private.h#L64">
      lv_draw_image_tiled_helper [#lv_draw_image_tiled_helper]

      Can be used by draw units for TILED images to handle the decoding and prepare everything for the actual image rendering

      ```c title=" " lineNumbers=1
      void lv_draw_image_tiled_helper(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords, lv_draw_image_core_cb draw_core_cb, const lv_image_decoder_args_t *decoder_args)
      ```

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

      | Name           | Type                                                                                 | Description                                             |
      | -------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------- |
      | `t`            | <ApiLink name="lv_draw_task_t" display="lv_draw_task_t *" />                         | pointer to a draw task                                  |
      | `draw_dsc`     | <ApiLink name="lv_draw_image_dsc_t" display="const lv_draw_image_dsc_t *" />         | the draw descriptor of the image                        |
      | `coords`       | <ApiLink name="lv_area_t" display="const lv_area_t *" />                             | the absolute coordinates of the image                   |
      | `draw_core_cb` | <ApiLink name="lv_draw_image_core_cb" />                                             | a callback to perform the actual rendering              |
      | `decoder_args` | <ApiLink name="lv_image_decoder_args_t" display="const lv_image_decoder_args_t *" /> | the args passed to image decoders, or NULL for defaults |
    </ApiMember>
  </ApiTab>
</ApiTabs>

Structs [#structs]

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

  | Member         | Type                                                           | Description |
  | -------------- | -------------------------------------------------------------- | ----------- |
  | `alpha_color`  | <ApiLink name="lv_color_t" />                                  |             |
  | `palette`      | <ApiLink name="lv_color32_t" display="const lv_color32_t *" /> |             |
  | `palette_size` | <ApiLink name="uint32_t" />                                    |             |
</ApiMember>

Dependencies [#dependencies]

<FileIncludes includes="[&#x22;lv_draw_image.h&#x22;]" includedBy="[&#x22;lv_nanovg_image_cache.h&#x22;, &#x22;lv_draw_nema_gfx.h&#x22;, &#x22;lv_draw_sw_arm2d.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_color.h&#x22;, &#x22;lv_color_op.h&#x22;, &#x22;lv_conf_internal.h&#x22;, &#x22;lv_conf_kconfig.h&#x22;, &#x22;lv_draw.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.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;]" />
