26 #define INTELLIGENT_RENDER_WITH_SCREEN_COORDS 41 #if defined(OSD_31_BIT) || defined(OSD_32_BIT) 42 #define DLA_struct _DLA4_Surface 43 #define DLA_Surface DLA4_Surface 44 #define DLA_FUNCTION(func) DLA_PC4_ ## func 45 #define DLAColor OSDColor 47 #if defined(OSD_16_BIT) || defined(OSD_8_BIT) 56 #define DLA_struct _DLA2_Surface 57 #define DLA_Surface DLA2_Surface 58 #define DLA_FUNCTION(func) DLA_PC2_ ## func 59 #define DLAColor HD2Color 70 #define DLA_struct _DLA1_Surface 71 #define DLA_Surface DLA1_Surface 72 #define DLA_FUNCTION(func) DLA_PC1_ ## func 73 #define DLAColor U8BIT 83 #define MAX(a, b) ((a) > (b) ? (a) : (b)) 84 #define MIN(a, b) ((a) < (b) ? (a) : (b)) 86 #ifdef INTELLIGENT_RENDER_WITH_SCREEN_COORDS 87 #define HD_SCALEUP_RECT(dli, x, y, w, h, lw) \ 88 if (mg_ctxt.osd_y.mlt != mg_ctxt.osd_y.div) \ 90 w = HD_X_SCALEUP(dli->sd_x + w + x); \ 91 x = HD_X_SCALEUP(dli->sd_x + x); \ 93 x -= HD_X_SCALEUP(dli->sd_x); \ 94 h = HD_Y_SCALEUP(dli->sd_y + h + y); \ 95 y = HD_Y_SCALEUP(dli->sd_y + y); \ 97 y -= HD_Y_SCALEUP(dli->sd_y); \ 99 lw = HD_W_SCALEUP(lw); \ 103 #define HD_SCALEUP_REGN(dli, l, t, r, b) \ 104 if (mg_ctxt.osd_y.mlt != mg_ctxt.osd_y.div) \ 106 r = HD_X_SCALEUP(dli->sd_x + r) - HD_X_SCALEUP(dli->sd_x); \ 107 l = HD_X_SCALEUP(dli->sd_x + l) - HD_X_SCALEUP(dli->sd_x); \ 108 t = HD_Y_SCALEUP(dli->sd_y + t) - HD_Y_SCALEUP(dli->sd_y); \ 109 b = HD_Y_SCALEUP(dli->sd_y + b) - HD_Y_SCALEUP(dli->sd_y); \ 114 #define HD_SCALEUP_RECT(dli, x, y, w, h, lw) \ 115 if (mg_ctxt.osd_y.mlt != mg_ctxt.osd_y.div) \ 117 w = HD_X_SCALEUP(w + x); \ 118 x = HD_X_SCALEUP(x); \ 120 h = HD_Y_SCALEUP(h + y); \ 121 y = HD_Y_SCALEUP(y); \ 124 lw = HD_W_SCALEUP(lw); \ 128 #define HD_SCALEUP_REGN(dli, l, t, r, b) \ 129 if (mg_ctxt.osd_y.mlt != mg_ctxt.osd_y.div) \ 131 r = HD_X_SCALEUP(r); \ 132 l = HD_X_SCALEUP(l); \ 133 t = HD_Y_SCALEUP(t); \ 134 b = HD_Y_SCALEUP(b); \ 139 #define LOCK_BUFFER( di, c_sz ) \ 140 if (di->canvas.col_buff == NULL) { \ 141 di->canvas.col_buff = STB_OSDMhegLockBuffer( di->canvas.hw_handle, &di->canvas.buff_pitch ); \ 144 #define UNLOCK_BUFFER( di ) \ 145 if (di->canvas.col_buff != NULL) { \ 146 STB_OSDMhegUnlockBuffer( di->canvas.hw_handle ); \ 147 di->canvas.col_buff = NULL; \ 159 OSDColor canvas_colour;
160 OSDColor border_colour;
163 S16BIT sd_width, sd_height;
164 #ifdef INTELLIGENT_RENDER_WITH_SCREEN_COORDS 186 U32BIT c_col, c_size;
195 IF_COL_DEPTH( COLOUR_FORMAT_PALETTE )
198 c_size = dla_info->canvas.width * dla_info->canvas.height;
199 c_col = OSD_FindNearestColourIndex(dla_info->canvas_colour);
200 memset(dla_info->canvas.col_buff, c_col, c_size );
203 if (OSD_IsColourOpaque(c_col))
205 if (dla_info->border_width == 0)
207 dla_info->canvas.opaque = TRUE;
211 c_col = OSD_FindNearestColourIndex(dla_info->border_colour);
212 dla_info->canvas.opaque = OSD_IsColourOpaque(c_col);
217 dla_info->canvas.opaque = FALSE;
221 ELSE IF_COL_DEPTH( COLOUR_FORMAT_ARGB4444 )
227 LOCK_BUFFER( dla_info, 2 )
229 c_size = (dla_info->canvas.buff_pitch * dla_info->canvas.height) / 2;
230 c_buf = (HD2Color *)dla_info->canvas.col_buff;
231 c_col = dla_info->canvas_colour;
232 col = MakeHD2Color(c_col);
239 if ((col >> 12) == 0xf)
241 if (dla_info->border_width == 0)
243 dla_info->canvas.opaque = TRUE;
247 dla_info->canvas.opaque = (dla_info->border_colour >> 28) == 0xf;
252 dla_info->canvas.opaque = FALSE;
259 #if defined(OSD_31_BIT) || defined(OSD_32_BIT) 262 LOCK_BUFFER( dla_info, 4 )
264 c_size = (dla_info->canvas.buff_pitch * dla_info->canvas.height) / 4;
265 c_buf = (OSDColor *)dla_info->canvas.col_buff;
266 ConvertAlpha(dla_info->canvas_colour, c_col);
273 if ((c_col >> 24) == MAX_ALPHA)
275 if (dla_info->border_width == 0)
277 dla_info->canvas.opaque = TRUE;
281 dla_info->canvas.opaque = (dla_info->border_colour >> 24) == 0xff;
286 dla_info->canvas.opaque = FALSE;
312 int line_width,
int bordered,
313 OSDColor line_colour, OSDColor fill_colour)
315 S16BIT sd_width = w, sd_height = h;
323 if (mg_ctxt.osd_y.mlt != mg_ctxt.osd_y.div)
325 w = HD_X_SCALEUP(x + w);
326 w -= HD_X_SCALEUP(x);
327 h = HD_Y_SCALEUP(y + h);
328 h -= HD_Y_SCALEUP(y);
334 if (new_info != NULL)
336 TRACE(TGRAPHICS, (
"(%d,%d,%d,%d,lw=%d,b=%d,lcol=0x%x,fcol=0x%x)", x, y, w, h,
337 line_width, bordered, line_colour, fill_colour))
338 new_info->canvas_colour = fill_colour;
339 new_info->border_colour = line_colour;
340 new_info->border_width = line_width;
341 new_info->canvas.width = w;
342 new_info->canvas.height = h;
343 new_info->sd_width = sd_width;
344 new_info->sd_height = sd_height;
345 #ifdef INTELLIGENT_RENDER_WITH_SCREEN_COORDS 348 new_info->hd_x = HD_X_SCALEUP(x);
349 new_info->hd_y = HD_Y_SCALEUP(y);
351 IF_COL_DEPTH( COLOUR_FORMAT_PALETTE )
354 U8BIT col = OSD_FindNearestColourIndex(new_info->canvas_colour);
356 new_info->canvas.buff_pitch = w;
357 new_info->canvas.hw_handle = NULL;
358 new_info->canvas.col_buff = OSD_MemAlloc( w * h );
360 if (new_info->canvas.col_buff)
362 memset( new_info->canvas.col_buff, col, w * h );
364 if (OSD_IsColourOpaque( col ))
368 new_info->canvas.opaque = TRUE;
372 col = OSD_FindNearestColourIndex( line_colour );
373 new_info->canvas.opaque = OSD_IsColourOpaque(col);
378 new_info->canvas.opaque = FALSE;
382 ELSE IF_COL_DEPTH( COLOUR_FORMAT_ARGB4444 )
384 #if defined(OSD_16_BIT) 385 HD2Color col = MakeHD2Color(fill_colour);
386 new_info->canvas.buff_pitch = w << 1;
388 OSD_DbgAddSurf( &new_info->canvas );
389 new_info->canvas.col_buff = NULL;
390 if ((col >> 12) == 0xf)
394 new_info->canvas.opaque = TRUE;
398 new_info->canvas.opaque = (line_colour >> 28) == 0xf;
403 new_info->canvas.opaque = FALSE;
410 #if defined(OSD_31_BIT) || defined(OSD_32_BIT) 412 new_info->canvas.buff_pitch = w << 2;
413 ConvertAlpha(fill_colour, f_col);
415 OSD_DbgAddSurf( &new_info->canvas );
416 new_info->canvas.col_buff = NULL;
417 if ((f_col >> 24) == MAX_ALPHA)
421 new_info->canvas.opaque = TRUE;
425 new_info->canvas.opaque = (line_colour >> 24) == 0xff;
430 new_info->canvas.opaque = FALSE;
434 new_info->polygon.point_list = NULL;
435 new_info->polygon.num_points = 0;
457 assert( data != NULL );
462 IF_COL_DEPTH( COLOUR_FORMAT_PALETTE )
465 OSD_MemFree( dla_info->canvas.col_buff );
470 #if defined(OSD_16_BIT) || defined(OSD_31_BIT) || defined(OSD_32_BIT) 471 UNLOCK_BUFFER( dla_info )
473 OSD_DbgRemSurf( &dla_info->canvas );
500 int start_angle,
int arc_angle,
int line_width,
501 OSDColor line_colour)
509 IF_COL_DEPTH( COLOUR_FORMAT_PALETTE )
512 U8BIT c_ndx = OSD_FindNearestColourIndex(line_colour);
514 DLA_PC1_Arc((DLA1_Surface *)&dla_info->canvas, x, y, w, h,
515 start_angle, arc_angle, line_width, c_ndx );
517 if (!OSD_IsColourOpaque(c_ndx))
519 dla_info->canvas.opaque = FALSE;
523 ELSE IF_COL_DEPTH( COLOUR_FORMAT_ARGB4444 )
526 HD_SCALEUP_RECT(dla_info, x, y, w, h, line_width);
528 LOCK_BUFFER( dla_info, 2 )
530 DLA_PC2_Arc((DLA2_Surface *)&dla_info->canvas, x, y, w, h,
531 start_angle, arc_angle, line_width, MakeHD2Color(line_colour));
533 if ((line_colour >> 28) != 0xf)
535 dla_info->canvas.opaque = FALSE;
542 #if defined(OSD_31_BIT) || defined(OSD_32_BIT) 544 ConvertAlpha(line_colour, l_col);
546 HD_SCALEUP_RECT(dla_info, x, y, w, h, line_width);
548 LOCK_BUFFER( dla_info, 4 )
550 DLA_PC4_Arc((DLA4_Surface *)&dla_info->canvas, x, y, w, h,
551 start_angle, arc_angle, line_width, l_col );
553 if ((l_col >> 24) != MAX_ALPHA)
555 dla_info->canvas.opaque = FALSE;
580 int line_width, OSDColor line_colour, OSDColor fill_colour)
588 IF_COL_DEPTH( COLOUR_FORMAT_PALETTE )
591 U8BIT f_ndx = OSD_FindNearestColourIndex(fill_colour);
592 U8BIT l_ndx = OSD_FindNearestColourIndex(line_colour);
594 DLA_PC1_Ellipse((DLA1_Surface *)&dla_info->canvas, x, y, w, h,
595 line_width, f_ndx, l_ndx );
597 if (!OSD_IsColourOpaque(f_ndx) || !OSD_IsColourOpaque(l_ndx))
599 dla_info->canvas.opaque = FALSE;
603 ELSE IF_COL_DEPTH( COLOUR_FORMAT_ARGB4444 )
606 HD_SCALEUP_RECT(dla_info, x, y, w, h, line_width);
608 LOCK_BUFFER( dla_info, 2 )
610 DLA_PC2_Ellipse((DLA2_Surface *)&dla_info->canvas, x, y, w, h,
611 line_width, MakeHD2Color(fill_colour), MakeHD2Color(line_colour));
613 if (((fill_colour >> 28) != 0xf) || ((line_colour >> 28) != 0xf))
615 dla_info->canvas.opaque = FALSE;
622 #if defined(OSD_31_BIT) || defined(OSD_32_BIT) 623 OSDColor f_col, l_col;
624 ConvertAlpha(fill_colour, f_col);
625 ConvertAlpha(line_colour, l_col);
627 HD_SCALEUP_RECT(dla_info, x, y, w, h, line_width);
629 LOCK_BUFFER( dla_info, 4 )
631 DLA_PC4_Ellipse((DLA4_Surface *)&dla_info->canvas, x, y, w, h,
632 line_width, f_col, l_col );
634 if (((f_col >> 24) != MAX_ALPHA) || ((l_col >> 24) != MAX_ALPHA))
636 dla_info->canvas.opaque = FALSE;
663 int start_angle,
int arc_angle,
int line_width,
664 OSDColor line_colour, OSDColor fill_colour)
672 IF_COL_DEPTH( COLOUR_FORMAT_PALETTE )
675 U8BIT f_ndx = OSD_FindNearestColourIndex(fill_colour);
676 U8BIT l_ndx = OSD_FindNearestColourIndex(line_colour);
678 DLA_PC1_Sector((DLA1_Surface *)&dla_info->canvas, x, y, w, h,
679 start_angle, arc_angle, line_width, f_ndx, l_ndx );
681 if (!OSD_IsColourOpaque(f_ndx) || !OSD_IsColourOpaque(l_ndx))
683 dla_info->canvas.opaque = FALSE;
687 ELSE IF_COL_DEPTH( COLOUR_FORMAT_ARGB4444 )
690 HD_SCALEUP_RECT(dla_info, x, y, w, h, line_width);
692 LOCK_BUFFER( dla_info, 2 )
694 DLA_PC2_Sector((DLA2_Surface *)&dla_info->canvas, x, y + 1, w, h,
695 start_angle, arc_angle, line_width,
696 MakeHD2Color(fill_colour), MakeHD2Color(line_colour));
698 if (((fill_colour >> 28) != 0xf) || ((line_colour >> 28) != 0xf))
700 dla_info->canvas.opaque = FALSE;
707 #if defined(OSD_31_BIT) || defined(OSD_32_BIT) 708 OSDColor f_col, l_col;
709 ConvertAlpha(fill_colour, f_col);
710 ConvertAlpha(line_colour, l_col);
712 HD_SCALEUP_RECT(dla_info, x, y, w, h, line_width);
714 LOCK_BUFFER( dla_info, 4 )
716 DLA_PC4_Sector((DLA4_Surface *)&dla_info->canvas, x, y + 1, w, h,
717 start_angle, arc_angle, line_width, f_col, l_col );
719 if (((f_col >> 24) != MAX_ALPHA) || ((l_col >> 24) != MAX_ALPHA))
721 dla_info->canvas.opaque = FALSE;
742 int line_width, OSDColor line_colour)
750 HD_SCALEUP_REGN(dla_info, x1, y1, x2, y2);
751 line_width = HD_W_SCALEUP(line_width);
752 IF_COL_DEPTH( COLOUR_FORMAT_PALETTE )
755 U8BIT l_ndx = OSD_FindNearestColourIndex(line_colour);
757 DLA_PC1_Line((DLA1_Surface *)&dla_info->canvas, x1, y1, x2, y2,
760 if (!OSD_IsColourOpaque(l_ndx))
762 dla_info->canvas.opaque = FALSE;
766 ELSE IF_COL_DEPTH( COLOUR_FORMAT_ARGB4444 )
769 LOCK_BUFFER( dla_info, 2 )
771 DLA_PC2_Line((DLA2_Surface *)&dla_info->canvas, x1, y1, x2, y2,
772 line_width, MakeHD2Color(line_colour));
774 if ((line_colour >> 28) != 0xf)
776 dla_info->canvas.opaque = FALSE;
783 #if defined(OSD_31_BIT) || defined(OSD_32_BIT) 785 ConvertAlpha(line_colour, l_col);
787 LOCK_BUFFER( dla_info, 4 )
789 DLA_PC4_Line((DLA4_Surface *)&dla_info->canvas, x1, y1, x2, y2,
792 if ((l_col >> 24) != MAX_ALPHA)
794 dla_info->canvas.opaque = FALSE;
817 dla_info->polygon.point_list = NULL;
818 dla_info->polygon.num_points = 0;
845 #ifdef INTELLIGENT_RENDER_WITH_SCREEN_COORDS 846 pl->point.x = HD_X_SCALEUP(dla_info->sd_x + x) - dla_info->hd_x;
847 pl->point.y = HD_Y_SCALEUP(dla_info->sd_y + y) - dla_info->hd_y;
849 pl->point.x = HD_X_SCALEUP(x);
850 pl->point.y = HD_Y_SCALEUP(y);
852 pl->next = dla_info->polygon.point_list;
853 dla_info->polygon.point_list = pl;
854 dla_info->polygon.num_points++;
872 OSDColor fill_colour,
int filled)
881 IF_COL_DEPTH( COLOUR_FORMAT_PALETTE )
884 U8BIT f_ndx = OSD_FindNearestColourIndex(fill_colour);
885 U8BIT l_ndx = OSD_FindNearestColourIndex(line_colour);
889 DLA_PC1_Polygon((DLA1_Surface *)&dla_info->canvas, dla_info->polygon,
890 line_width, f_ndx, l_ndx );
894 DLA_PC1_Polyline((DLA1_Surface *)&dla_info->canvas, dla_info->polygon,
898 if (!OSD_IsColourOpaque(f_ndx) || !OSD_IsColourOpaque(l_ndx))
900 dla_info->canvas.opaque = FALSE;
904 ELSE IF_COL_DEPTH( COLOUR_FORMAT_ARGB4444 )
908 line_width = HD_W_SCALEUP(line_width);
910 LOCK_BUFFER( dla_info, 2 )
914 DLA_PC2_Polygon((DLA2_Surface *)&dla_info->canvas, dla_info->polygon,
915 line_width, MakeHD2Color(fill_colour), MakeHD2Color(line_colour));
919 DLA_PC2_Polyline((DLA2_Surface *)&dla_info->canvas, dla_info->polygon,
920 line_width, MakeHD2Color(line_colour));
922 if (((fill_colour >> 28) != 0xf) || ((line_colour >> 28) != 0xf))
924 dla_info->canvas.opaque = FALSE;
931 #if defined(OSD_31_BIT) || defined(OSD_32_BIT) 932 OSDColor f_col, l_col;
933 ConvertAlpha(fill_colour, f_col);
934 ConvertAlpha(line_colour, l_col);
936 line_width = HD_W_SCALEUP(line_width);
938 LOCK_BUFFER( dla_info, 4 )
942 DLA_PC4_Polygon((DLA4_Surface *)&dla_info->canvas, dla_info->polygon,
943 line_width, f_col, l_col );
947 DLA_PC4_Polyline((DLA4_Surface *)&dla_info->canvas, dla_info->polygon,
950 if (((f_col >> 24) != MAX_ALPHA) || ((l_col >> 24) != MAX_ALPHA))
952 dla_info->canvas.opaque = FALSE;
975 int line_width, OSDColor line_colour, OSDColor fill_colour)
983 TRACE(TGRAPHICS, (
"sd(l=%d,t=%d,r=%d,b=%d)", x1, y1, x2, y2))
984 IF_COL_DEPTH( COLOUR_FORMAT_PALETTE )
987 U8BIT f_ndx = OSD_FindNearestColourIndex(fill_colour);
988 U8BIT l_ndx = OSD_FindNearestColourIndex(line_colour);
990 DLA_PC1_Rectangle((DLA1_Surface *)&dla_info->canvas, x1, y1, x2, y2,
991 line_width, line_width, f_ndx, l_ndx );
993 if (!OSD_IsColourOpaque(f_ndx) || !OSD_IsColourOpaque(l_ndx))
995 dla_info->canvas.opaque = FALSE;
999 ELSE IF_COL_DEPTH( COLOUR_FORMAT_ARGB4444 )
1002 HD_SCALEUP_REGN(dla_info, x1, y1, x2, y2);
1004 LOCK_BUFFER( dla_info, 2 )
1006 TRACE(TGRAPHICS, (
"hd(l=%d,t=%d,r=%d,b=%d)", x1, y1, x2, y2))
1007 DLA_PC2_Rectangle((DLA2_Surface *)&dla_info->canvas, x1, y1, x2, y2,
1008 HD_X_SCALEUP(line_width), HD_Y_SCALEUP(line_width),
1009 MakeHD2Color(fill_colour), MakeHD2Color(line_colour));
1011 if (((fill_colour >> 28) != 0xf) || ((line_colour >> 28) != 0xf))
1013 dla_info->canvas.opaque = FALSE;
1020 #if defined(OSD_31_BIT) || defined(OSD_32_BIT) 1021 OSDColor f_col, l_col;
1022 ConvertAlpha(fill_colour, f_col);
1023 ConvertAlpha(line_colour, l_col);
1025 HD_SCALEUP_REGN(dla_info, x1, y1, x2, y2);
1027 LOCK_BUFFER( dla_info, 4 )
1029 TRACE(TGRAPHICS, (
"hd(l=%d,t=%d,r=%d,b=%d)", x1, y1, x2, y2))
1030 DLA_PC4_Rectangle((DLA4_Surface *)&dla_info->canvas, x1, y1, x2, y2,
1031 HD_W_SCALEUP(line_width), HD_W_SCALEUP(line_width),
1034 if (((f_col >> 24) != MAX_ALPHA) || ((l_col >> 24) != MAX_ALPHA))
1036 dla_info->canvas.opaque = FALSE;
1053 U16BIT x1_bw, y1_bw, x2_bw, y2_bw;
1055 FUNCTION_START(OSDdisplayDynamicLineart);
1060 if (mg_ctxt.osd_y.mlt == mg_ctxt.osd_y.div)
1062 x1_bw = y1_bw = x2_bw = y2_bw = dla_info->border_width;
1066 #ifdef INTELLIGENT_RENDER_WITH_SCREEN_COORDS 1067 x1_bw = HD_X_SCALEUP(dla_info->border_width);
1068 y1_bw = HD_Y_SCALEUP(dla_info->border_width);
1069 x2_bw = HD_X_SCALEUP(dla_info->border_width);
1070 y2_bw = HD_Y_SCALEUP(dla_info->border_width);
1072 #error Be intelligent 1073 x1_bw = HD_W_SCALEUP(dla_info->border_width);
1074 y1_bw = HD_W_SCALEUP(dla_info->border_width);
1075 x2_bw = dla_info->canvas.width - HD_W_SCALEUP(dla_info->sd_width - dla_info->border_width);
1076 y2_bw = dla_info->canvas.height - HD_W_SCALEUP(dla_info->sd_height - dla_info->border_width);
1079 if (dla_info->border_width != 0)
1081 TRACE(TGRAPHICS, (
"bord_width=%d", dla_info->border_width))
1083 IF_COL_DEPTH( COLOUR_FORMAT_PALETTE )
1086 DLA_PC1_Border((DLA1_Surface *)&dla_info->canvas, x1_bw, y1_bw, x2_bw, y2_bw,
1087 OSD_FindNearestColourIndex(dla_info->border_colour));
1091 ELSE IF_COL_DEPTH( COLOUR_FORMAT_ARGB4444 )
1094 LOCK_BUFFER( dla_info, 2 )
1096 DLA_PC2_Border((DLA2_Surface *)&dla_info->canvas, x1_bw, y1_bw, x2_bw, y2_bw,
1097 MakeHD2Color(dla_info->border_colour));
1103 #if defined(OSD_31_BIT) || defined(OSD_32_BIT) 1105 ConvertAlpha(dla_info->border_colour, b_col);
1107 LOCK_BUFFER( dla_info, 4 )
1109 DLA_PC4_Border((DLA4_Surface *)&dla_info->canvas, x1_bw, y1_bw, x2_bw, y2_bw, b_col );
1115 IF_COL_DEPTH( COLOUR_FORMAT_PALETTE )
1120 #if defined(OSD_16_BIT) || defined(OSD_31_BIT) || defined(OSD_32_BIT) 1121 UNLOCK_BUFFER( dla_info )
1124 MG_DisplayImage( &dla_info->canvas, overlap, HD_X_SCALEUP(x), HD_Y_SCALEUP(y));
1127 FUNCTION_FINISH(OSDdisplayDynamicLineart);
void OSDdrawEllipse(void *data, int x, int y, int w, int h, int line_width, OSDColor line_colour, OSDColor fill_colour)
Add a draw ellipse action to the action list.
void MG_OSDdisplayDynamicLineart(void *data, S_REGION *overlap, int x, int y)
Display dynamic lineart.
void * STB_OSDMhegCreateSurface(U16BIT width, U16BIT height, BOOLEAN init, U32BIT colour)
Creates a hardware surface on which MHEG5 engine will draw an individual MHEG object. At its basic the function can just allocate the buffer to be returned by STB_OSDMhegLockBuffer(). It's size being: (width * height * bytes_per_pixel) Also, when 'init' is TRUE, function initialises surface buffer to the specified colour. For pixel colour format of less than four bytes, use least significant bits of 'colour'.
MHEG-5 Graphics: Dynamic Line-Art utility functions.
void OSDdrawDrawLine(void *data, int x1, int y1, int x2, int y2, int line_width, OSDColor line_colour)
Add a line draw action to the list.
void STB_OSDMhegDestroySurface(void *surface)
This function destroys surface and all data allocated by STB_OSDMhegCreateSurface() ...
void MG_DisplayImage(S_SURFACE *data, S_REGION *overlap, S32BIT x, S32BIT y)
Copy the image to the screen buffer.
void OSDclearDynamicLineart(void *data)
On screen display - clear dynamic line art.
void OSDdrawPolygon(void *data, int line_width, OSDColor line_colour, OSDColor fill_colour, int filled)
Add a draw polygon instruction to the action list.
void OSDdrawPolygonAdd(void *data, int x, int y)
Add co-ordinates that describe a polygon to draw to the action list.
void OSDdrawSector(void *data, int x, int y, int w, int h, int start_angle, int arc_angle, int line_width, OSDColor line_colour, OSDColor fill_colour)
Add a draw sector action to the action list.
void OSDfreeDynamicLineart(void *data)
On screen display - free resources dla.
void OSDdrawPolygonStart(void *data)
Initialise a new draw polygon to add to the action list.
void * OSDinitDynamicLineart(int x, int y, int w, int h, int line_width, int bordered, OSDColor line_colour, OSDColor fill_colour)
On screen display - initialise dynamic line art.
void OSDdrawArc(void *data, int x, int y, int w, int h, int start_angle, int arc_angle, int line_width, OSDColor line_colour)
Add a draw arc action to the action list.
void OSDdrawRectangle(void *data, int x1, int y1, int x2, int y2, int line_width, OSDColor line_colour, OSDColor fill_colour)
Add a draw rectangle action to the action list.