RGA DrawImageChild does not take the in_SourceMinX and in_SourceMinY into account

Hi,

I'm developing a display with a Renesas RZ/A2M and I'm trying to draw some texts with the RGA library.

For now, I have a solution where I have one PNG image per character and I display the appropriate character at the right place. However, this is heavy to setup as I need to upload every PNG and to check that each are correct. I thought about a solution where I have a bigger picture with several characters on it to limit the number of PNG files.

To implement this, I use the R_GRAPHICS_DrawImageChild method. Here is its documentation.

/***********************************************************************
* Function Name:R_GRAPHICS_DrawImageChild
*    Draws a part of an image
*
* Arguments:
*    self     - Graphics drawing context
*    in_Image - Image
*    in_SourceMinX   - Minimum X coordinates in the image
*    in_SourceMinY   - Minimum Y coordinates in the image
*    in_SourceWidth  - Width  in the image
*    in_SourceHeight - Height in the image
*    in_DestinationMinX   - Minimum X coordinates of the drawing target
*    in_DestinationMinY   - Minimum Y coordinates of the drawing target
*    in_DestinationWidth  - Width  of the drawing target
*    in_DestinationHeight - Height of the drawing target
*
* Return Value:
*    Error code. 0=No error. <errnum_t> type
*
* Description:
*    When "in_SourceWidth" is not "in_DestinationWidth" or
*    "in_SourceHeight" is not "in_DestinationHeight", images are enlarged or reduced.
*    A part of image can be drawn with matrix of translate and zoom.
*    But it cannot be drawn with another matrix.
*
*    See the description on the <R_GRAPHICS_DrawImage> function.
*    See <Figure_RGA_DrawImageChild>.
************************************************************************/
errnum_t  R_GRAPHICS_DrawImageChild
    ( graphics_t*  self,  const graphics_image_t*  in_Image,
    int_fast32_t  in_SourceMinX,        int_fast32_t  in_SourceMinY,
    int_fast32_t  in_SourceWidth,       int_fast32_t  in_SourceHeight,
    int_fast32_t  in_DestinationMinX,   int_fast32_t  in_DestinationMinY,
    int_fast32_t  in_DestinationWidth,  int_fast32_t  in_DestinationHeight );

It seems to work, but in practice, it always takes the source image at 0,0 and whatever the value of in_SourceMinX and in_SourceMinY, the result is always the same, and I have the first character of my image. I am sure that I give the correct value inside my full image. I even try to put some random values and it acts like it is (0, 0).

Is there something I need to know about these values or a bug that have been fixed recently on this method ?

Here is an example of the full image (each character is 10 pixels large):

For the letter 't', I have to take the child at 80, 0 but what is displayed is 'l'

Thanks for your help !