Lcd companion boards support (VKLCD50RTA & VKLCD70RT)

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers rga_func.h Source File

rga_func.h

00001 /*
00002 Permission is hereby granted, free of charge, to any person obtaining a copy
00003 of this software and associated documentation files (the "Software"), to deal
00004 in the Software without restriction, including without limitation the rights
00005 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
00006 copies of the Software, and to permit persons to whom the Software is
00007 furnished to do so, subject to the following conditions:
00008  
00009 The above copyright notice and this permission notice shall be included in
00010 all copies or substantial portions of the Software.
00011  
00012 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00013 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00014 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
00015 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00016 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
00017 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
00018 THE SOFTWARE.
00019 */
00020  
00021 #ifndef RGA_FUNC_H
00022 #define RGA_FUNC_H
00023 
00024 #include "RGA.h"
00025 #include "lcd_panel.h"
00026 
00027 typedef struct {
00028     char * style;
00029     int x;
00030     int y;
00031     int w;
00032     int h;
00033 } draw_rectangle_pos_t;
00034 
00035 typedef enum {
00036     MANUAL_INTERACT,
00037     AUTO_INTERACT
00038 }interact_t;
00039 
00040 #if (LCD_VDC5_CH0_PANEL == LCD_CH0_PANEL_VKLCD70RT)
00041  #define IMG_DRAW_WIDTH                      (518)
00042  #define IMG_DRAW_HEIGHT                     (322)
00043  #define IMAGE_WIDTH_SCROLL_FUNC             (835)      // Image width of Scroll function
00044  #define IMAGE_HEIGHT_SCROLL_FUNC            (322)      // Image height of Scroll function
00045  #define IMAGE_WIDTH_ZOOM_FUNC               (518)      // Image width of Zoom function
00046  #define IMAGE_HEIGHT_ZOOM_FUNC              (322)      // Image height of Zoom function
00047  #define CRYSTAL_DIAMETER                    (119)
00048  #define SLIDE_WIDTH                         (106)
00049  #define NO_DEV_X                            (285)
00050  #define NO_DEV_Y                            (75)
00051 #else
00052  #define IMG_DRAW_WIDTH                      (235)
00053  #define IMG_DRAW_HEIGHT                     (146)
00054  #define IMAGE_WIDTH_SCROLL_FUNC             (379)      // Image width of Scroll function
00055  #define IMAGE_HEIGHT_SCROLL_FUNC            (146)      // Image height of Scroll function
00056  #define IMAGE_WIDTH_ZOOM_FUNC               (235)      // Image width of Zoom function
00057  #define IMAGE_HEIGHT_ZOOM_FUNC              (146)      // Image height of Zoom function
00058  #define CRYSTAL_DIAMETER                    (55)
00059  #define SLIDE_WIDTH                         (50)
00060  #define NO_DEV_X                            (128)
00061  #define NO_DEV_Y                            (24)
00062 #endif
00063 
00064 #define DISSOLVE_MAX_NUM                    (256)
00065 #define SCROLL_MAX_NUM                      (IMAGE_WIDTH_SCROLL_FUNC - IMG_DRAW_WIDTH)
00066 #define ZOOM_MAX_NUM                        (IMAGE_HEIGHT_ZOOM_FUNC / 2)
00067 #define ROTATION_MAX_NUM                    (360)
00068 #define ACCELERATE_MAX_NUM                  (256)
00069 
00070 #define ANIMATION_TIMING_EASE               (0)
00071 #define ANIMATION_TIMING_LINEAR             (1)
00072 #define ANIMATION_TIMING_EASE_IN            (2)
00073 #define ANIMATION_TIMING_EASE_OUT           (3)
00074 #define ANIMATION_TIMING_EASE_IN_OUT        (4)
00075 
00076 extern void Set_RGAObject(frame_buffer_t* frmbuf_info);
00077 extern void RGA_Func_DrawFullScreen(frame_buffer_t* frmbuf_info, const graphics_image_t *image);
00078 extern void RGA_Func_DrawRectangle(frame_buffer_t* frmbuf_info, draw_rectangle_pos_t * pos, int pos_num);
00079 extern void RGA_Func_DrawImage(frame_buffer_t* frmbuf_info, int x, int y);
00080 extern void RGA_Func_Dissolve(frame_buffer_t* frmbuf_info, float32_t global_alpha, interact_t mode);
00081 extern void RGA_Func_Scroll(frame_buffer_t* frmbuf_info, int src_width_pos, interact_t mode);
00082 extern void RGA_Func_Zoom(frame_buffer_t* frmbuf_info, int src_height_pos, interact_t mode);
00083 extern void RGA_Func_Rotation(frame_buffer_t* frmbuf_info, graphics_matrix_float_t image_angle, interact_t mode);
00084 extern void RGA_Func_Accelerate(frame_buffer_t* frmbuf_info, int animation_timing, float32_t relative_pos);
00085 extern void Rotor(frame_buffer_t* frmbuf_info, graphics_matrix_float_t image_angle);
00086 
00087 extern void RGA_Func_DrawCamScreen(uint8_t* cam_buffer);
00088 extern void RGA_Func_DrawPNG(frame_buffer_t* frmbuf_info, const graphics_image_t* png_img, int x, int y);
00089 extern bool RGA_Func_CheckPorts(frame_buffer_t* frmbuf_info, bool rca_pluged, bool usb_pluged);
00090 extern void RGA_Func_Rotor(frame_buffer_t* frmbuf_info, graphics_matrix_float_t image_angle, interact_t mode, graphics_image_t *image);
00091 extern void RGA_Func_Axel(frame_buffer_t* frmbuf_info, int animation_timing, float32_t relative_pos, graphics_image_t* image);
00092 extern void RGA_Func_Zo(frame_buffer_t* frmbuf_info, int src_height_pos, interact_t mode, graphics_image_t* image);
00093 extern void RGA_Func_Scr(frame_buffer_t* frmbuf_info, int src_width_pos, interact_t mode, graphics_image_t* image);
00094 extern void RGA_Func_Diss(frame_buffer_t* frmbuf_info, float32_t global_alpha, interact_t mode, graphics_image_t* image);
00095 #endif
00096