RZ/A1H Group Graphics Library "RGA" Introduction This Application Note Describes the Graphics Library RGA (Renesas Graphics Architecture) of RZ/A1H
Total Page:16
File Type:pdf, Size:1020Kb
Application Note RZ/A1H Group Graphics Library "RGA" Introduction This application note describes the Graphics Library RGA (Renesas Graphics Architecture) of RZ/A1H. The following lists features of the RGA. Allows high-speed drawing using the hardware acceleration. The API created based on the W3C standard HTML Canvas 2D Context achieves easy learning. In addition, the RGA provides C++API that is operable as an interface that is backward compatible with HTML Canvas 2D Context. The memory area provided by the application is available as a drawing destination or for input images. Allows drawing of translucent images and translucent drawing using an alpha mask. The RGA provides a conversion tool that can access image files as global variables. (This conversion tool operates on the host PC.) Target Device RZ/A1H Group RZ/A1M Group RZ/A1L Group When applying the sample program covered in this application note to another microcomputer, modify the program according to the specifications for the target microcomputer and conduct an extensive evaluation of the modified program. Restrictions This library is not compatible with the vector graphics supported by Renesas Graphics Processor for OpenVG™ (R-GPVG2). The hardware acceleration is used only for a part of drawing (Table 1-2), (6.11.1). RZ/A1L does not use hardware acceleration. And it cannot use a part of drawing. (Table 1-3) This library cannot be used in multiple threads. Use the RGA in a single thread. R01AN2162EJ0401 Rev.4.01 Page 1 of 144 Jan.27.21 RZ/A1H Group Graphics Library RGA Contents Graphics Library "RGA" .................................................................................................................. 1 1. Specifications .......................................................................................................................... 5 2. File Configuration .................................................................................................................. 10 3. Operation Verification Conditions ........................................................................................... 12 4. Reference Application Note(s) ............................................................................................... 13 5. Description of Hardware ........................................................................................................ 14 5.1 Hardware Configuration ........................................................................................................................ 14 5.2 List of Pins to be Used .......................................................................................................................... 15 6. Description of Software .......................................................................................................... 16 6.1 Outline of Operations ............................................................................................................................ 16 6.1.1 When Drawing on a Buffer Defined by the Application ....................................................................... 16 6.1.2 Drawing on the Display Screen ........................................................................................................... 18 6.2 Hardware resource allocation ................................................................................................................ 21 6.3 Required Memory Size .......................................................................................................................... 22 6.4 Using OS resources .............................................................................................................................. 23 6.5 List of Constants .................................................................................................................................... 24 6.5.1 Constants ............................................................................................................................................ 24 6.5.2 Constants in porting layer .................................................................................................................... 25 6.6 Types and Classes ................................................................................................................................ 26 6.6.1 Basic Types and Values ...................................................................................................................... 26 6.6.2 Error Codes ......................................................................................................................................... 26 6.6.3 Types Only for the C Language .......................................................................................................... 27 6.6.4 Classes Only for the C++ Language ................................................................................................... 29 6.6.5 Types/Classes Available for C Language and C++ Language ........................................................... 32 6.6.6 String Format ....................................................................................................................................... 43 6.6.7 Type of porting layers .......................................................................................................................... 44 6.6.8 Changing state of class ....................................................................................................................... 45 6.7 List of Variables ..................................................................................................................................... 46 6.8 Properties .............................................................................................................................................. 47 6.8.1 Canvas2D_ContextClass Properties ................................................................................................... 47 6.8.2 Canvas2D_ImageClass Properties ..................................................................................................... 49 6.9 Functions and Methods ......................................................................................................................... 50 6.9.1 Functions Equivalent to graphics_t Class Member Function .............................................................. 50 6.9.2 Functions Equivalent to graphics_image_t Class Member Function .................................................. 68 6.9.3 Functions Equivalent to graphics_pattern_t Class Member Function ................................................. 71 6.9.4 Functions Related to Creating C++ Object ......................................................................................... 72 R01AN2162EJ0401 Rev.4.01 Page 2 of 144 Jan.27.21 RZ/A1H Group Graphics Library RGA 6.9.5 Canvas2D_ContextClass Member Functions ..................................................................................... 73 6.9.6 Functions Related to Canvas2D_ImageClass .................................................................................... 80 6.9.7 Functions Related to Canvas2D_PatternClass ................................................................................... 80 6.9.8 Functions Related to WindowSurfacesClass ...................................................................................... 81 6.9.9 Functions Equivalent to window_surfaces_t Class Member Functions .............................................. 83 6.9.10 Functions Equivalent to video_input_t Class Member Functions ....................................................... 87 6.9.11 Functions Related to byte_per_pixel_t Class ...................................................................................... 88 6.9.12 Functions Related to v_sync_t Class .................................................................................................. 89 6.9.13 Functions Related to vram_stack_t Class ........................................................................................... 91 6.9.14 Functions Related to vram_ex_stack_t Class ..................................................................................... 92 6.9.15 Functions Related to animation_timing_function_t Class ................................................................... 93 6.9.16 Other Functions ................................................................................................................................... 94 6.9.17 Functions in strings ............................................................................................................................. 96 6.10 Porting layer Functions .......................................................................................................................... 97 6.10.1 Functions on Default Settings of RGA ................................................................................................ 97 6.10.2 Functions related to cooperation with JCU ......................................................................................... 99 6.10.3 Porting layer functions of OSPL ........................................................................................................ 100 6.10.4 Porting layer functions of RGPNCG .................................................................................................. 101 6.11 Supplementary Explanation ................................................................................................................ 106 6.11.1 Correspondence