| 1 | /****************************************************************************** |
|---|
| 2 | |
|---|
| 3 | Copyright (c) 2004 Digital STREAM Technology Inc. All Rights Reserved |
|---|
| 4 | |
|---|
| 5 | FILE NAME |
|---|
| 6 | |
|---|
| 7 | GRP_Service.h |
|---|
| 8 | |
|---|
| 9 | VERSION |
|---|
| 10 | |
|---|
| 11 | Version 0.4 |
|---|
| 12 | |
|---|
| 13 | DESCRIPTION |
|---|
| 14 | |
|---|
| 15 | This file is for 2'D draw module be to used in Application . |
|---|
| 16 | |
|---|
| 17 | AUTHOR |
|---|
| 18 | |
|---|
| 19 | S/W 3 Team Jongki Jeong. |
|---|
| 20 | |
|---|
| 21 | HISTORY |
|---|
| 22 | |
|---|
| 23 | NAME DATE REMARKS |
|---|
| 24 | |
|---|
| 25 | Jongki jeong 03-09-2004 Created initial version 0.01 |
|---|
| 26 | Jongki jeong 04-07-2004 modify 3d box¿Í shadow box ±×¸®´Â ºÎºÐ |
|---|
| 27 | Jinsook Kim 05-19-2004 add GRP_DrawRectBoxEx() |
|---|
| 28 | Jinsook Kim 06-11-2004 add GRP_Draw3DBox1Thick,GRP_Draw3DBox2Thick, |
|---|
| 29 | add GRP_Draw3DBox2Thick,GRP_Draw3dBoxEx, |
|---|
| 30 | add GRP_Draw3dEffectEx() |
|---|
| 31 | Jinsook Kim 06-18-2004 add GRP_ShowScrollEx,GRP_GetTempCanvas, |
|---|
| 32 | add GRP_FreeTempCanvas, |
|---|
| 33 | Jinsook Kim 06-25-2004 Updated version : 0.01->0.1 |
|---|
| 34 | Jinsook Kim 08-18-2004 Updated version : 0.1->0.2 |
|---|
| 35 | Jong-ki Jeong 03-14-2005 CANVAS MODE °ü·Ã ±¸Á¶Ã¼ ¹× ÇÔ¼öÃß°¡ |
|---|
| 36 | Jinsook Kim 03-30-2005 Updated version : 0.2->0.3 |
|---|
| 37 | Jinsook Kim 04-21-2005 Updated version : 0.3->0.4 |
|---|
| 38 | |
|---|
| 39 | REMARK |
|---|
| 40 | |
|---|
| 41 | |
|---|
| 42 | ******************************************************************************/ |
|---|
| 43 | #ifndef GRP_SERVICE_H |
|---|
| 44 | #define GRP_SERVICE_H |
|---|
| 45 | /*---------------------------------------------------------------------------- |
|---|
| 46 | * include files |
|---|
| 47 | *----------------------------------------------------------------------------*/ |
|---|
| 48 | #include "GRP_DDI.h" |
|---|
| 49 | |
|---|
| 50 | #ifdef __cplusplus |
|---|
| 51 | extern "C" { |
|---|
| 52 | #endif |
|---|
| 53 | |
|---|
| 54 | #define UINT8U UINT8 |
|---|
| 55 | /*----------------------------------------------------------------------------- |
|---|
| 56 | * type define of variable types |
|---|
| 57 | *----------------------------------------------------------------------------*/ |
|---|
| 58 | #define GRP_BCOLOR SINT32 //2bit bitmap À϶§¸¸ À¯È¿, 8bit bitmap À϶§´Â -1 |
|---|
| 59 | |
|---|
| 60 | //TLGraphicsUtils.h TL_PIXEL_FORMATS ÂüÁ¶ |
|---|
| 61 | typedef enum { |
|---|
| 62 | GRP_INDEX8 =0, |
|---|
| 63 | GRP_RGB32 =1, |
|---|
| 64 | GRP_INDEX8TORGB32 =2 |
|---|
| 65 | }GRP_PIXEL_FORMAT; |
|---|
| 66 | |
|---|
| 67 | typedef enum { |
|---|
| 68 | GRP_ARIB_MODE, //Arib »ç¿ë |
|---|
| 69 | GRP_DIRECT_WRITE, //Display ¸Þ¸ð¸® ¿¡ ¹Ù·Î ¾¸ |
|---|
| 70 | GRP_BUFFER_WRITE, //SYS ¹öÆÛ¸Þ¸ð¸® ¿¡ ¾¸ |
|---|
| 71 | GRP_NUM_CANVAS_ACCESS //ÄÜÆ®·Ñ ¹æ¹ý °¹¼ö |
|---|
| 72 | }GRP_CANVAS_ACCESS; |
|---|
| 73 | |
|---|
| 74 | /******* scroll ¹æÇâ *********************************************************/ |
|---|
| 75 | typedef enum { |
|---|
| 76 | GRP_LT2RT =0, |
|---|
| 77 | GRP_RT2LT =1, |
|---|
| 78 | GRP_TOP2BOT =2, |
|---|
| 79 | GRP_BOT2TOP =3 |
|---|
| 80 | }GRP_DIRECTION; |
|---|
| 81 | |
|---|
| 82 | /******* Point (X.Y) ºÎºÐ ****************************************************/ |
|---|
| 83 | typedef struct { |
|---|
| 84 | SINT32 x; |
|---|
| 85 | SINT32 y; |
|---|
| 86 | }GRP_POINT; |
|---|
| 87 | |
|---|
| 88 | |
|---|
| 89 | /* |
|---|
| 90 | typedef struct { |
|---|
| 91 | |
|---|
| 92 | UINT8 GRP_BLACK ; |
|---|
| 93 | UINT8 GRP_WHITE ; |
|---|
| 94 | UINT8 GRP_YELLOW; |
|---|
| 95 | UINT8 GRP_RED; |
|---|
| 96 | UINT8 GRP_GREEN; |
|---|
| 97 | UINT8 GRP_BLUE; |
|---|
| 98 | UINT8 GRP_CYAN; |
|---|
| 99 | UINT8 GRP_MAGENTA; |
|---|
| 100 | |
|---|
| 101 | }GRP_8COLOR; |
|---|
| 102 | |
|---|
| 103 | */ |
|---|
| 104 | /******* RGB ±¸Á¶Ã¼ **********************************************************/ |
|---|
| 105 | typedef struct { |
|---|
| 106 | UINT8 r ; |
|---|
| 107 | UINT8 g ; |
|---|
| 108 | UINT8 b ; |
|---|
| 109 | UINT8 blend; |
|---|
| 110 | }GRP_RGB; |
|---|
| 111 | |
|---|
| 112 | /******* OSD palette *********************************************************/ |
|---|
| 113 | typedef struct { |
|---|
| 114 | GRP_RGB *rgbs; |
|---|
| 115 | UINT16 num_colors; //color ¼ö |
|---|
| 116 | UINT8 tsp_index ; //transparent color |
|---|
| 117 | #if 0 |
|---|
| 118 | GRP_8COLOR colors; |
|---|
| 119 | UINT32 mb_title_fill_color; //message box title fill color |
|---|
| 120 | UINT32 mb_title_str_color; //messgae box title string color |
|---|
| 121 | UINT32 mb_contents_fill_color; //message box contents fill color |
|---|
| 122 | UINT32 mb_contents_str_color; //message box contents string color |
|---|
| 123 | UINT32 mb_bar_color ; //message box bar back color |
|---|
| 124 | UINT32 mb_bar_str_color; //message box bar string color |
|---|
| 125 | #endif |
|---|
| 126 | UINT32 _3d_black; //3D color ¸¦ ¸¸µé¶§ ±âº»ÀûÀ¸·Î »ç¿ëµÇ´Â BLACK |
|---|
| 127 | UINT32 _3d_white; //3D color ¸¦ ¸¸µé¶§ ±âº»ÀûÀ¸·Î »ç¿ëµÇ´Â WHITE |
|---|
| 128 | UINT32 _3d_black_gray; //3D color ¸¦ ¸¸µé¶§ ±âº»ÀûÀ¸·Î »ç¿ëµÇ´Â gray °èÅë BLACK |
|---|
| 129 | UINT32 _3d_white_gray; //3D color ¸¦ ¸¸µé¶§ ±âº»ÀûÀ¸·Î »ç¿ëµÇ´Â gray °èÅë WHITE |
|---|
| 130 | UINT32 shadow_color1; //shaodw box color ¸¸µé¶§ °¡Àå ³»ºÎ |
|---|
| 131 | UINT32 shadow_color2; //shaodw box color ¸¸µé¶§ Áß°£À§Ä¡ÀÇ color |
|---|
| 132 | UINT32 shadow_color3; //shaodw box color ¸¸µé¶§ °¡Àå ¹Ù±ù color |
|---|
| 133 | }GRP_PALETTE; |
|---|
| 134 | |
|---|
| 135 | /******* bitmap À̹ÌÁö Á¤º¸ **************************************************/ |
|---|
| 136 | typedef struct { |
|---|
| 137 | UINT8 *bitdata; //bit map data |
|---|
| 138 | SINT16 width; //bitmap ÀÇ width |
|---|
| 139 | SINT16 height; //bitmap ÀÌ height |
|---|
| 140 | |
|---|
| 141 | // UINT16 bit_per_pix; //bit per pixel |
|---|
| 142 | |
|---|
| 143 | //iskang data type change. UINT8->UINT32 |
|---|
| 144 | //±âÁ¸¿¡´Â compressed type±â¾ïÇϰí ÀÖÀ¸³ª |
|---|
| 145 | //BCM 4bit¾ÐÃàÀ» ÇÏ¸é¼ bitmap data Å©±â Á¤º¸¸¦ °¡Áö°Ô µÇ¾ú´Ù. |
|---|
| 146 | //¾ÕÀÇ 3byte´Â bitmap data±æÀÌ, µÚÀÇ 1byte´Â compressed format type. |
|---|
| 147 | UINT32 compressed; //if compressed => !0 |
|---|
| 148 | |
|---|
| 149 | }GRP_BBLK, GRP_LOGO; |
|---|
| 150 | |
|---|
| 151 | /******* bitmap À̹ÌÁö + ÇØ»óµµ Àû¿ëÀ̹ÌÁö ***********************************/ |
|---|
| 152 | typedef union { |
|---|
| 153 | |
|---|
| 154 | GRP_BBLK *bblk[GRP_NUM_RESOLUTION] ; |
|---|
| 155 | /* |
|---|
| 156 | struct { |
|---|
| 157 | GRP_BBLK *_960_bitmap; |
|---|
| 158 | GRP_BBLK *_720_bitmap; |
|---|
| 159 | GRP_BBLK *_480_bitmap; |
|---|
| 160 | }res; |
|---|
| 161 | */ |
|---|
| 162 | }GRP_BBLK_RES; |
|---|
| 163 | |
|---|
| 164 | /******* bitmap À̹ÌÁö·Î ±¸¼ºµÈ frame ****************************************/ |
|---|
| 165 | typedef struct { |
|---|
| 166 | GRP_BBLK *lt_bone; //left bone |
|---|
| 167 | GRP_BBLK *rt_bone; //right bone |
|---|
| 168 | }GRP_LTRT_FRAME; |
|---|
| 169 | |
|---|
| 170 | typedef struct { |
|---|
| 171 | GRP_BBLK *top_bone; //top bone |
|---|
| 172 | GRP_BBLK *bot_bone; //bottom bone |
|---|
| 173 | }GRP_TOPBOT_FRAME; |
|---|
| 174 | |
|---|
| 175 | typedef struct { |
|---|
| 176 | GRP_BBLK *lt_bone; //left bone |
|---|
| 177 | GRP_BBLK *rt_bone; //right bone |
|---|
| 178 | GRP_BBLK *top_bone; //top bone |
|---|
| 179 | GRP_BBLK *bot_bone; //bottom bone |
|---|
| 180 | }GRP_RECT_FRAME; |
|---|
| 181 | |
|---|
| 182 | typedef struct { |
|---|
| 183 | GRP_BBLK *lt_bone; //left bone |
|---|
| 184 | GRP_BBLK *rt_bone; //right bone |
|---|
| 185 | GRP_BBLK *top_bone; //top bone |
|---|
| 186 | GRP_BBLK *bot_bone; //bottom bone |
|---|
| 187 | GRP_BBLK *center; //center bitmap |
|---|
| 188 | }GRP_RECT_CENTER_FRAME; |
|---|
| 189 | |
|---|
| 190 | typedef struct { |
|---|
| 191 | GRP_BBLK *lt_top_edge; //ÁÂÃø À§ ±ÍÅüÀÌ bitmap |
|---|
| 192 | GRP_BBLK *rt_top_edge; //¿ìÃø À§ ±ÍÅüÀÌ bitmap |
|---|
| 193 | GRP_BBLK *lt_bot_edge; //ÁÂÃø ¾Æ·¡ ±ÍÅüÀÌ bitmap |
|---|
| 194 | GRP_BBLK *rt_bot_edge; //¿ìÃø ¾Æ·¡ ±ÍÅüÀÌ bitmap |
|---|
| 195 | |
|---|
| 196 | GRP_BBLK *lt_bone; //left bone |
|---|
| 197 | GRP_BBLK *rt_bone; //right bone |
|---|
| 198 | GRP_BBLK *top_bone; //top bone |
|---|
| 199 | GRP_BBLK *bot_bone; //bottom bone |
|---|
| 200 | |
|---|
| 201 | }GRP_EDGE_FRAME; |
|---|
| 202 | |
|---|
| 203 | /******* Á¤·Ä Á¾·ù ***********************************************************/ |
|---|
| 204 | typedef enum { |
|---|
| 205 | GRP_CENTER =0, //¿µ¿ªÀÇ Á¤Áß¾Ó |
|---|
| 206 | GRP_CENTER_TOP , //Á¿ì center, À§ÂÊ Á¤·Ä |
|---|
| 207 | GRP_CENTER_BOT , //Á¿ì center, ¾Æ·¡ÂÊ Á¤·Ä |
|---|
| 208 | GRP_CENTER_LEFT , //»óÇÏ center, ÁÂÃø Á¤·Ä |
|---|
| 209 | GRP_CENTER_RIGHT, //»óÇÏ center, ¿ìÃø Á¤·Ä |
|---|
| 210 | GRP_CENTER_LONG_ITEM, //ITEMÁß °¡Àå ±ä ITEMÀ» ±âÁØÀ¸·Î CENTER ALIGN ÇÒ¶§»ç¿ë. |
|---|
| 211 | GRP_NUM_JUSTIFY |
|---|
| 212 | }GRP_JUSTIFY; |
|---|
| 213 | |
|---|
| 214 | /****************************************************************************/ |
|---|
| 215 | typedef struct { |
|---|
| 216 | UINT32 str_color; |
|---|
| 217 | UINT32 str_bak_color; |
|---|
| 218 | }GRP_STRING_COLOR; |
|---|
| 219 | |
|---|
| 220 | /****************************************************************************/ |
|---|
| 221 | typedef struct { |
|---|
| 222 | SINT8 *str[GRP_NUM_NATION];//0 :¹Ì±¹ 1 :ÇÑ±Û |
|---|
| 223 | UINT32 str_color ; |
|---|
| 224 | UINT32 str_bak_color ; |
|---|
| 225 | }GRP_TEXT_STRING; |
|---|
| 226 | |
|---|
| 227 | /****************************************************************************/ |
|---|
| 228 | /* |
|---|
| 229 | typedef struct { |
|---|
| 230 | SINT8 *str[GRP_NUM_NATION]; //0 :¹Ì±¹ 1 :ÇÑ±Û |
|---|
| 231 | GFN_FONT_ATTR font_attr; //font ¼Ó¼º |
|---|
| 232 | }GRP_TEXT_ATTR; |
|---|
| 233 | */ |
|---|
| 234 | typedef struct { |
|---|
| 235 | SINT8 *str[GRP_NUM_NATION]; //0:¹Ì±¹, 1:ÇÑ±Û |
|---|
| 236 | }GRP_STRINGS; |
|---|
| 237 | |
|---|
| 238 | /****************************************************************************/ |
|---|
| 239 | typedef struct { |
|---|
| 240 | SINT32 px ,py; |
|---|
| 241 | GRP_BBLK *image; |
|---|
| 242 | }GRP_MOUSE_IMAGE; |
|---|
| 243 | |
|---|
| 244 | /******* BITMAP font data map ÀÌ ¾î¶»°Ô ±¸¼ºµÇ¾îÀִ°¡¸¦ ³ªÅ¸³¿ ***************/ |
|---|
| 245 | |
|---|
| 246 | |
|---|
| 247 | /******* »ç¿ëÇÒ canvas *******************************************************/ |
|---|
| 248 | /* */ |
|---|
| 249 | /* ¿©±â¼± ÇÑ plane À» ÇÑcanvas ·Î ¼³Á¤Çسõ¾Ò´Ù */ |
|---|
| 250 | /* ÇÑ plane ³»¿¡ ¿©·¯ canvas ¸¦ ¼³Á¤ÇÒ¼öÀÖÁö¸¸ program »ó */ |
|---|
| 251 | /* º°·Î È¿¿ë¼ºÀÌ ¶³¾îÁ® ¿©±â¼± 1°³ÀÇ canvas ¸¦ »ç¿ëÇß´Ù */ |
|---|
| 252 | /* Application ¿¡¼´Â ÂüÁ¶ÇÒÇÊ¿ä¾ø´Ù */ |
|---|
| 253 | /*****************************************************************************/ |
|---|
| 254 | |
|---|
| 255 | typedef struct CANVAS_tag { |
|---|
| 256 | PIXEL_MAP *pixel_map; |
|---|
| 257 | PIXEL_MAP *buf_map; |
|---|
| 258 | SINT8 plane; |
|---|
| 259 | SINT32 h_scale; |
|---|
| 260 | SINT32 v_scale; |
|---|
| 261 | GRP_RESOLUTION resolution; |
|---|
| 262 | SINT32 x,y,w,h; //canvas size |
|---|
| 263 | GRP_PALETTE *palette; //ÇöÀç»ç¿ëÁßÀÎ palette, °è¼Óº¯ÇÒ ¼ö ÀÖÀ½ |
|---|
| 264 | GRP_PALETTE *org_palette; //»ç¿ëÀÚ°¡ µî·ÏÇÑ palette, not modified |
|---|
| 265 | GRP_PIXEL_FORMAT pixel_fmt; // |
|---|
| 266 | |
|---|
| 267 | UINT32 nation; //menu osd ¿ë |
|---|
| 268 | GRP_RECT refresh_r; //ÀÚµ¿À¸·Î refresh ¸¦ ÇϱâÀ§ÇÔ |
|---|
| 269 | |
|---|
| 270 | GRP_RECT *rmask; //rmask not used |
|---|
| 271 | |
|---|
| 272 | /* ¾Æ·¡´Â ÆùÆ®°ü·Ã ÇÑ ºÎºÐ */ |
|---|
| 273 | UINT32 font_nation; //epg, info µî ½ºÆ®¸²ÀÇ nation À» µû¶ó¾ßÇÏ´Â °æ¿ì¿¡ »ç¿ë. ¾ÆÁ÷ »ç¿ëÇÏÁö ¸¶¼¼¿ä |
|---|
| 274 | UINT32 font_mode; |
|---|
| 275 | void *font_attr; |
|---|
| 276 | void *font_inside; //*true_finfo; //true font info |
|---|
| 277 | |
|---|
| 278 | void *user_finfo; //current user font |
|---|
| 279 | void *user_flist; |
|---|
| 280 | /* void *fixed_user_font;*/ //³ªÁß¿¡ Ãß°¡»ç¿ëÇÏÁöµµ ¸ð¸§ |
|---|
| 281 | void *dst_hfinfo; |
|---|
| 282 | void *dst_hflist; |
|---|
| 283 | /* |
|---|
| 284 | UINT32 ctrl_msg_task_aborted; |
|---|
| 285 | UITN32 ctrl_msg_task_spawned; |
|---|
| 286 | OS_SEMAPHORE_ID ctrl_msg_sema; |
|---|
| 287 | */ |
|---|
| 288 | struct CANVAS_tag *next; |
|---|
| 289 | }_CANVAS_; |
|---|
| 290 | |
|---|
| 291 | typedef struct CANVAS_tag CANVAS ; |
|---|
| 292 | |
|---|
| 293 | /******* functions for canvas or plane ***************************************/ |
|---|
| 294 | void GRP_AutoRefreshPlane(CANVAS *cv); |
|---|
| 295 | void GRP_CanvasInitialize(UINT32 num_plane); |
|---|
| 296 | void GRP_CanvasInitializeEx(UINT32 num_plane, GRP_PIXEL_FORMAT pixel_fmt); |
|---|
| 297 | void GRP_CanvasTerminate(void); |
|---|
| 298 | void GRP_Close(void); |
|---|
| 299 | void GRP_ClearCanvas(CANVAS *cv); |
|---|
| 300 | void GRP_ClearPlain(CANVAS *cv, SINT32 x, SINT32 y, SINT32 w, SINT32 h ); |
|---|
| 301 | #define GRP_ClearPlainR(cv, r) GRP_ClearPlain( cv,(SINT32)((r)->x), (SINT32)((r)->y), (SINT32)((r)->w),(SINT32)((r)->h)) |
|---|
| 302 | CANVAS *GRP_GetCanvas(UINT32 plane); |
|---|
| 303 | void GRP_GetCanvasSize(CANVAS *cv, SINT32 *width, SINT32 *height); |
|---|
| 304 | CANVAS *GRP_GetLastCanvas(void ); |
|---|
| 305 | SINT32 GRP_GetPlaneIndex(CANVAS *cv ); |
|---|
| 306 | void GRP_Open(GRP_RESOLUTION osd_resolution); |
|---|
| 307 | void GRP_OpenEx(GRP_RESOLUTION osd_resolution,GRP_PIXEL_FORMAT pixel_fmt); |
|---|
| 308 | void GRP_RefreshCanvas(CANVAS *cv); |
|---|
| 309 | void GRP_RefreshPlane(CANVAS *cv, UINT16 x, UINT16 y, UINT16 w, UINT16 h); |
|---|
| 310 | #define GRP_RefreshPlaneR(cv,r) GRP_RefreshPlane(cv,(SINT32)((r)->x), (SINT32)((r)->y), (SINT32)((r)->w),(SINT32)((r)->h)) |
|---|
| 311 | void GRP_SetCanvasMode(GRP_CANVAS_ACCESS access_mode ); |
|---|
| 312 | |
|---|
| 313 | void GRP_ShowCursor(CANVAS *cv,int x,int y, BOOLEAN bErase); |
|---|
| 314 | void GRP_UsedScaleTopology(GRP_RESOLUTION resolution, int h_scale, int v_scale); |
|---|
| 315 | GRP_CANVAS_ACCESS GRP_GetCanvasMode(void); |
|---|
| 316 | |
|---|
| 317 | /******* functions for temp canvas *******************************************/ |
|---|
| 318 | CANVAS *GRP_GetTempCanvas(CANVAS *cv, SINT32 w, SINT32 h); |
|---|
| 319 | CANVAS *GRP_GetTempCanvasEx(CANVAS *cv, SINT32 w, SINT32 h, GRP_PIXEL_FORMAT pixel_fmt); |
|---|
| 320 | void GRP_FreeTempCanvas( CANVAS **cv ); |
|---|
| 321 | |
|---|
| 322 | /******* functions for Palette ***********************************************/ |
|---|
| 323 | void GRP_ResetPalette(CANVAS *cv ); |
|---|
| 324 | void GRP_UpdateBlend(CANVAS *cv, UINT8 blend_value ); |
|---|
| 325 | void GRP_UpdateBlendPercentage(CANVAS *cv, UINT8 percentage);//Ãß°¡--040513 |
|---|
| 326 | void GRP_UpdateBlendRange(CANVAS *cv, UINT8 blend_value, SINT32 from_index, SINT32 to_index ); |
|---|
| 327 | void GRP_UpdatePalette(CANVAS *cv , GRP_PALETTE *palette ); |
|---|
| 328 | void GRP_UpdatePaletteRange(CANVAS *cv, GRP_RGB *rgbs, SINT32 from_index, SINT32 to_index ); |
|---|
| 329 | void GRP_SetDefaultPalette(CANVAS *cv , GRP_PALETTE *palette ); |
|---|
| 330 | |
|---|
| 331 | /******* functions for 2D Draw ***********************************************/ |
|---|
| 332 | void GRP_DrawBox(CANVAS *cv, SINT32 x, SINT32 y, SINT32 w, SINT32 h, UINT32 pal_index); |
|---|
| 333 | #define GRP_DrawBoxR(cv, r, col) GRP_DrawBox( cv,(SINT32)((r)->x), (SINT32)((r)->y), (SINT32)((r)->w),(SINT32)((r)->h), (UINT32)col) |
|---|
| 334 | void GRP_DrawEllipse (CANVAS *cv , SINT32 xcenter, SINT32 ycenter, SINT32 radx, SINT32 rady , UINT32 pal_index); |
|---|
| 335 | void GRP_DrawFEllipse ( CANVAS *cv ,SINT32 xcenter, SINT32 ycenter, SINT32 radx, SINT32 rady , UINT32 pal_index ); |
|---|
| 336 | void GRP_DrawOEllipse ( CANVAS *cv ,SINT32 xcenter, SINT32 ycenter, SINT32 radx, SINT32 rady, UINT32 opal_index , UINT32 ipal_index ); |
|---|
| 337 | void GRP_DrawHLine(CANVAS *cv ,SINT32 x, SINT32 y, SINT32 w, UINT32 pal_index); |
|---|
| 338 | void GRP_DrawRect(CANVAS *cv ,SINT32 x, SINT32 y, SINT32 w, SINT32 h, UINT32 pal_index); |
|---|
| 339 | #define GRP_DrawRectR(cv, r, col) GRP_DrawRect( cv,(SINT32)((r)->x), (SINT32)((r)->y), (SINT32)((r)->w),(SINT32)((r)->h), (UINT32)col) |
|---|
| 340 | void GRP_DrawRectEx(CANVAS *cv ,SINT32 x, SINT32 y, SINT32 w, SINT32 h, UINT32 pal_index, SINT32 line_num, SINT32 line_gap); |
|---|
| 341 | #define GRP_DrawRectExR(cv, r, col, line_num, line_gap) GRP_DrawRectEx(cv,(SINT32)((r)->x), (SINT32)((r)->y), (SINT32)((r)->w),(SINT32)((r)->h), (UINT32)col, (SINT32)line_num, (SINT32)line_gap) |
|---|
| 342 | void GRP_DrawVLine(CANVAS *cv ,SINT32 x, SINT32 y, SINT32 h, UINT32 pal_index); |
|---|
| 343 | |
|---|
| 344 | /******* functions for Bitmap Draw *******************************************/ |
|---|
| 345 | SINT32 GRP_Draw2ColorBitmap(CANVAS *cv, SINT32 x,SINT32 y,GRP_BBLK *bblk,GRP_BCOLOR pal_index); |
|---|
| 346 | SINT32 GRP_Draw2ColorCenterBitmap(CANVAS *cv, SINT32 x, SINT32 y, SINT32 w, SINT32 h, GRP_BBLK *bblk, GRP_BCOLOR pal_index); |
|---|
| 347 | #define GRP_Draw2ColorCenterBitmapR(cv, r, bblk,pal_index) GRP_Draw2ColorCenterBitmap( cv,(SINT32)((r)->x), (SINT32)((r)->y), (SINT32)((r)->w),(SINT32)((r)->h), bblk,pal_index) |
|---|
| 348 | |
|---|
| 349 | SINT32 GRP_DrawBitmap(CANVAS *cv, SINT32 x , SINT32 y, GRP_BBLK *bblk); |
|---|
| 350 | SINT32 GRP_DrawCenterBitmap(CANVAS *cv, SINT32 x, SINT32 y, SINT32 w, SINT32 h, GRP_BBLK *bblk); |
|---|
| 351 | #define GRP_DrawCenterBitmapR(cv, r, bblk) GRP_DrawCenterBitmap( cv,(SINT32)((r)->x), (SINT32)((r)->y), (SINT32)((r)->w),(SINT32)((r)->h), bblk) |
|---|
| 352 | void GRP_DrawEdgeFrame(CANVAS *cv, GRP_RECT *out,GRP_RECT *in, GRP_EDGE_FRAME *frame, UINT32 fill_color); |
|---|
| 353 | void GRP_DrawLtRtFrame(CANVAS *cv, GRP_RECT *out,GRP_RECT *in, GRP_LTRT_FRAME *frame, UINT32 fill_color); |
|---|
| 354 | void GRP_DrawRectCenterFrame(CANVAS *cv, GRP_RECT *out,GRP_RECT *in, GRP_RECT_CENTER_FRAME *frame, UINT32 bak_color); |
|---|
| 355 | void GRP_DrawRectFrame(CANVAS *cv, GRP_RECT *out,GRP_RECT *in, GRP_RECT_FRAME *frame, UINT32 fill_color); |
|---|
| 356 | void GRP_DrawTopBotFrame(CANVAS *cv, GRP_RECT *out,GRP_RECT *in, GRP_TOPBOT_FRAME *frame, UINT32 fill_color); |
|---|
| 357 | |
|---|
| 358 | SINT32 GRP_FillBBlk(CANVAS *cv, SINT32 x, SINT32 y, SINT32 w, SINT32 h, GRP_BBLK *bblk); |
|---|
| 359 | #define GRP_FillBBlkR(cv, r, bblk) GRP_FillBBlk( cv,(SINT32)((r)->x), (SINT32)((r)->y), (SINT32)((r)->w),(SINT32)((r)->h), bblk) |
|---|
| 360 | SINT32 GRP_HorCopyBBlk( CANVAS *cv, SINT32 x ,SINT32 y, SINT32 w, GRP_BBLK *bblk); |
|---|
| 361 | SINT32 GRP_VerCopyBBlk(CANVAS *cv, SINT32 x, SINT32 y, SINT32 h, GRP_BBLK *bblk); |
|---|
| 362 | |
|---|
| 363 | #define GetResImage(cv, image) (image)->bblk[cv->resolution] |
|---|
| 364 | //#define GetResImage(cv, image) (image)->bblk[(cv->resolution==GRP_1366_768p?GRP_1280_720p:cv->resolution)] |
|---|
| 365 | |
|---|
| 366 | /******* functions for image *************************************************/ |
|---|
| 367 | void GRP_ImageFree(void **bblk); |
|---|
| 368 | void *GRP_GetImage(CANVAS *cv, SINT32 x ,SINT32 y , SINT32 w,SINT32 h); |
|---|
| 369 | #define GRP_GetImageR(cv, r) GRP_GetImage( cv,(SINT32)((r)->x), (SINT32)((r)->y), (SINT32)((r)->w),(SINT32)((r)->h)) |
|---|
| 370 | |
|---|
| 371 | SINT32 GRP_PutImage(CANVAS *cv, SINT32 x ,SINT32 y , void *bit_block); |
|---|
| 372 | SINT32 GRP_RestoreImage(CANVAS *cv, void *bblk); |
|---|
| 373 | |
|---|
| 374 | /******* functions for scroll ************************************************/ |
|---|
| 375 | void GRP_HideScroll( CANVAS *cv , GRP_RECT *roi , int step_size, GRP_DIRECTION direction, SINT32 time ); |
|---|
| 376 | void GRP_OneStepScroll( CANVAS *cv , GRP_RECT *roi , int step_size, GRP_DIRECTION direction, UINT32 fill_color); |
|---|
| 377 | void GRP_ShowScroll( CANVAS *cv, GRP_RECT *roi, int step_size, GRP_DIRECTION direction, SINT32 time ); |
|---|
| 378 | void GRP_ShowScrollEx(CANVAS *des_cv, CANVAS *src_cv, GRP_RECT *des_roi, GRP_RECT *src_roi, SINT32 step_size, GRP_DIRECTION direction, SINT32 time); |
|---|
| 379 | |
|---|
| 380 | |
|---|
| 381 | /******* functions for etc util **********************************************/ |
|---|
| 382 | #define GRP_GetResolution(cv) ((cv)->resolution) |
|---|
| 383 | void GRP_CurrResolution(CANVAS *cv , GRP_RESOLUTION *resolution); |
|---|
| 384 | void GRP_GetRect(GRP_RECT *r, SINT32 x, SINT32 y, SINT32 w, SINT32 h); |
|---|
| 385 | void GRP_MsDelay( int milli_second ); |
|---|
| 386 | void GRP_RecoordinateR(CANVAS *cv, GRP_RECT *r); |
|---|
| 387 | void GRP_Recoordinate(CANVAS *cv, SINT32 *x , SINT32 *y); |
|---|
| 388 | void GRP_RecoordinateREx(GRP_RESOLUTION resolution , GRP_RECT *r ); |
|---|
| 389 | void GRP_RGB2YCbCr(GRP_RGB *rgb ,UINT32 *ycbcr); |
|---|
| 390 | void GRP_SetCorrectRatio(GRP_RESOLUTION resolution, float coord_x, float coord_y); |
|---|
| 391 | void GRP_SetReferencCoordinate(GRP_RESOLUTION resolution ); |
|---|
| 392 | void GRP_GetReferenceCoordinate( GRP_RESOLUTION *resolution ); |
|---|
| 393 | |
|---|
| 394 | #define GRP_INRANGE_R(r, px,py) ((((r)->x <=(px))&& ((r)->x+(r)->w >(px) )&&((r)->y <=(py))&& ((r)->y+(r)->h>(py))) ?1 :0) |
|---|
| 395 | #define GRP_INRANGE(range_x,range_y,range_w,range_h, x,y) (((range_x <=x)&& (range_x+range_w >x )&&(range_y <=y)&& (range_y+range_h>y)) ?1 :0) |
|---|
| 396 | |
|---|
| 397 | /******* nation info *********************************************************/ |
|---|
| 398 | GRP_NATION GRP_GetNation(CANVAS *cv); |
|---|
| 399 | void GRP_SetNation(CANVAS *cv, GRP_NATION nation); |
|---|
| 400 | |
|---|
| 401 | |
|---|
| 402 | /******* *******************************************************/ |
|---|
| 403 | // functions for 3D Box or Rect Draw |
|---|
| 404 | /******************************************/ |
|---|
| 405 | void GRP_Draw3dBox(CANVAS *cv,GRP_RECT *r, UINT32 fill_color, |
|---|
| 406 | SINT32 _3d_thick, UINT32 _3d_type, SINT32 shadow_thick); |
|---|
| 407 | void GRP_Draw3dBoxEx(CANVAS *cv, GRP_RECT *r, UINT32 fill_color, |
|---|
| 408 | SINT32 _3d_thick, SINT32 shadow_thick, |
|---|
| 409 | UINT32 _3d_out_lt_color, UINT32 _3d_out_rb_color, |
|---|
| 410 | UINT32 _3d_mid_lt_color, UINT32 _3d_mid_rb_color, |
|---|
| 411 | UINT32 _3d_in_lt_color, UINT32 _3d_in_rb_color); |
|---|
| 412 | |
|---|
| 413 | void GRP_Draw3dEffect(CANVAS *cv,GRP_RECT *r, |
|---|
| 414 | SINT32 _3d_thick, SINT32 _3d_type, SINT32 shadow_thick); |
|---|
| 415 | |
|---|
| 416 | void GRP_Draw3dEffectEx(CANVAS *cv, GRP_RECT *r, |
|---|
| 417 | SINT32 _3d_thick, SINT32 shadow_thick, |
|---|
| 418 | UINT32 _3d_out_lt_color, UINT32 _3d_out_rb_color, |
|---|
| 419 | UINT32 _3d_mid_lt_color, UINT32 _3d_mid_rb_color, |
|---|
| 420 | UINT32 _3d_in_lt_color, UINT32 _3d_in_rb_color); |
|---|
| 421 | |
|---|
| 422 | void GRP_Draw3DBox1Thick(CANVAS *cv, GRP_RECT *r, UINT32 fill_color, SINT32 shadow_thick, |
|---|
| 423 | UINT32 _3d_out_lt_color, UINT32 _3d_out_rb_color); |
|---|
| 424 | |
|---|
| 425 | void GRP_Draw3DBox2Thick(CANVAS *cv, GRP_RECT *r, UINT32 fill_color, SINT32 shadow_thick, |
|---|
| 426 | UINT32 _3d_out_lt_color, UINT32 _3d_out_rb_color, UINT32 _3d_in_lt_color, UINT32 _3d_in_rb_color); |
|---|
| 427 | |
|---|
| 428 | void GRP_Draw3DBox3Thick(CANVAS *cv, GRP_RECT *r, UINT32 fill_color, SINT32 shadow_thick, |
|---|
| 429 | UINT32 _3d_out_lt_color, UINT32 _3d_out_rb_color, |
|---|
| 430 | UINT32 _3d_mid_lt_color, UINT32 _3d_mid_rb_color, |
|---|
| 431 | UINT32 _3d_in_lt_color, UINT32 _3d_in_rb_color); |
|---|
| 432 | |
|---|
| 433 | void GRP_DrawRectBox(CANVAS *cv, GRP_RECT *r, SINT32 rect_thick, SINT32 shadow_thick, |
|---|
| 434 | UINT32 rect_color, UINT32 fill_color); |
|---|
| 435 | void GRP_DrawRectBoxEx(CANVAS *cv,GRP_RECT *r, SINT32 rect_thick, SINT32 shadow_thick, |
|---|
| 436 | UINT32 rect_lt_color, UINT32 rect_rb_color, UINT32 fill_color); |
|---|
| 437 | |
|---|
| 438 | |
|---|
| 439 | #ifdef __cplusplus |
|---|
| 440 | } |
|---|
| 441 | #endif |
|---|
| 442 | |
|---|
| 443 | #endif |
|---|
| 444 | //-----------------------------------------end of file |
|---|