test
Dependencies: GraphicsFramework GR-PEACH_video LCD_shield_config R_BSP
rga_func.h@0:66434fa5ef92, 2020-12-01 (annotated)
- Committer:
- shilianming
- Date:
- Tue Dec 01 07:32:37 2020 +0000
- Revision:
- 0:66434fa5ef92
0.1
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
shilianming | 0:66434fa5ef92 | 1 | /* |
shilianming | 0:66434fa5ef92 | 2 | Permission is hereby granted, free of charge, to any person obtaining a copy |
shilianming | 0:66434fa5ef92 | 3 | of this software and associated documentation files (the "Software"), to deal |
shilianming | 0:66434fa5ef92 | 4 | in the Software without restriction, including without limitation the rights |
shilianming | 0:66434fa5ef92 | 5 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
shilianming | 0:66434fa5ef92 | 6 | copies of the Software, and to permit persons to whom the Software is |
shilianming | 0:66434fa5ef92 | 7 | furnished to do so, subject to the following conditions: |
shilianming | 0:66434fa5ef92 | 8 | |
shilianming | 0:66434fa5ef92 | 9 | The above copyright notice and this permission notice shall be included in |
shilianming | 0:66434fa5ef92 | 10 | all copies or substantial portions of the Software. |
shilianming | 0:66434fa5ef92 | 11 | |
shilianming | 0:66434fa5ef92 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
shilianming | 0:66434fa5ef92 | 13 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
shilianming | 0:66434fa5ef92 | 14 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
shilianming | 0:66434fa5ef92 | 15 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
shilianming | 0:66434fa5ef92 | 16 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
shilianming | 0:66434fa5ef92 | 17 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
shilianming | 0:66434fa5ef92 | 18 | THE SOFTWARE. |
shilianming | 0:66434fa5ef92 | 19 | */ |
shilianming | 0:66434fa5ef92 | 20 | |
shilianming | 0:66434fa5ef92 | 21 | #ifndef RGA_FUNC_H |
shilianming | 0:66434fa5ef92 | 22 | #define RGA_FUNC_H |
shilianming | 0:66434fa5ef92 | 23 | |
shilianming | 0:66434fa5ef92 | 24 | #include "RGA.h" |
shilianming | 0:66434fa5ef92 | 25 | |
shilianming | 0:66434fa5ef92 | 26 | typedef struct { |
shilianming | 0:66434fa5ef92 | 27 | char * style; |
shilianming | 0:66434fa5ef92 | 28 | int x; |
shilianming | 0:66434fa5ef92 | 29 | int y; |
shilianming | 0:66434fa5ef92 | 30 | int w; |
shilianming | 0:66434fa5ef92 | 31 | int h; |
shilianming | 0:66434fa5ef92 | 32 | } draw_rectangle_pos_t; |
shilianming | 0:66434fa5ef92 | 33 | |
shilianming | 0:66434fa5ef92 | 34 | #define IMG_DRAW_WIDTH (241) |
shilianming | 0:66434fa5ef92 | 35 | #define IMG_DRAW_HEIGHT (180) |
shilianming | 0:66434fa5ef92 | 36 | #define IMAGE_WIDTH_SCROLL_FUNC (352) // Image width of Scroll function |
shilianming | 0:66434fa5ef92 | 37 | #define IMAGE_HEIGHT_SCROLL_FUNC (233) // Image height of Scroll function |
shilianming | 0:66434fa5ef92 | 38 | #define IMAGE_WIDTH_ZOOM_FUNC (352) // Image width of Zoom function |
shilianming | 0:66434fa5ef92 | 39 | #define IMAGE_HEIGHT_ZOOM_FUNC (233) // Image height of Zoom function |
shilianming | 0:66434fa5ef92 | 40 | |
shilianming | 0:66434fa5ef92 | 41 | #define DISSOLVE_MAX_NUM (256) |
shilianming | 0:66434fa5ef92 | 42 | #define SCROLL_MAX_NUM (IMAGE_WIDTH_SCROLL_FUNC - IMG_DRAW_WIDTH) |
shilianming | 0:66434fa5ef92 | 43 | #define ZOOM_MAX_NUM (IMAGE_HEIGHT_ZOOM_FUNC / 2) |
shilianming | 0:66434fa5ef92 | 44 | #define ROTATION_MAX_NUM (360) |
shilianming | 0:66434fa5ef92 | 45 | #define ACCELERATE_MAX_NUM (256) |
shilianming | 0:66434fa5ef92 | 46 | |
shilianming | 0:66434fa5ef92 | 47 | #define ANIMATION_TIMING_EASE (0) |
shilianming | 0:66434fa5ef92 | 48 | #define ANIMATION_TIMING_LINEAR (1) |
shilianming | 0:66434fa5ef92 | 49 | #define ANIMATION_TIMING_EASE_IN (2) |
shilianming | 0:66434fa5ef92 | 50 | #define ANIMATION_TIMING_EASE_OUT (3) |
shilianming | 0:66434fa5ef92 | 51 | #define ANIMATION_TIMING_EASE_IN_OUT (4) |
shilianming | 0:66434fa5ef92 | 52 | |
shilianming | 0:66434fa5ef92 | 53 | extern void Set_RGAObject(frame_buffer_t* frmbuf_info); |
shilianming | 0:66434fa5ef92 | 54 | extern void RGA_Func_DrawTopScreen(frame_buffer_t* frmbuf_info); |
shilianming | 0:66434fa5ef92 | 55 | extern void RGA_Func_DrawRectangle(frame_buffer_t* frmbuf_info, draw_rectangle_pos_t * pos, int pos_num); |
shilianming | 0:66434fa5ef92 | 56 | extern void RGA_Func_DrawImage(frame_buffer_t* frmbuf_info, int x, int y); |
shilianming | 0:66434fa5ef92 | 57 | extern void RGA_Func_Dissolve(frame_buffer_t* frmbuf_info, float32_t global_alpha); |
shilianming | 0:66434fa5ef92 | 58 | extern void RGA_Func_Scroll(frame_buffer_t* frmbuf_info, int src_width_pos); |
shilianming | 0:66434fa5ef92 | 59 | extern void RGA_Func_Zoom(frame_buffer_t* frmbuf_info, int src_height_pos); |
shilianming | 0:66434fa5ef92 | 60 | extern void RGA_Func_Rotation(frame_buffer_t* frmbuf_info, graphics_matrix_float_t image_angle); |
shilianming | 0:66434fa5ef92 | 61 | extern void RGA_Func_Accelerate(frame_buffer_t* frmbuf_info, int animation_timing, float32_t relative_pos); |
shilianming | 0:66434fa5ef92 | 62 | |
shilianming | 0:66434fa5ef92 | 63 | #endif |