# lv_draw_image_private.h (/api/private/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="private/draw/lv_draw_image_private.h" line="78" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/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`       | `int32_t`                                                  | width of the rectangle to transform  |
      | `h`       | `int32_t`                                                  | height of the rectangle to transform |
      | `angle`   | `int32_t`                                                  | angle of rotation                    |
      | `scale_x` | `uint16_t`                                                 | zoom in x direction, (256 no zoom)   |
      | `scale_y` | `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="private/draw/lv_draw_image_private.h" line="51" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/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="private/draw/lv_draw_image_private.h" line="64" url="https://github.com/lvgl/lvgl/tree/e1a0ad863f29742359bc680d6a7d973448ec2285/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` | `uint32_t`                                                     |             |
</ApiMember>

Dependencies [#dependencies]

<FileIncludes includes="[&#x22;lvgl_public.h&#x22;]" includedBy="[&#x22;lv_nanovg_image_cache.h&#x22;, &#x22;lv_draw_nema_gfx.h&#x22;, &#x22;lv_draw_sw_arm2d.h&#x22;, &#x22;lvgl_private.h&#x22;]" />
