MHEG5  15.3.0
source/graphics/src/mg_dla.c File Reference

MHEG-5 Glue: Dynamic line-art related functions. More...

#include "osd_utils.h"
#include "glue_memory.h"
#include "glue_debug.h"
#include "mg_osd.h"
#include "mg_api.h"

Data Structures

struct  _DLA_Info

Defines

#define INTELLIGENT_RENDER_WITH_SCREEN_COORDS
#define MAX(a, b)   ((a) > (b) ? (a) : (b))
#define MIN(a, b)   ((a) < (b) ? (a) : (b))
#define HD_SCALEUP_RECT(dli, x, y, w, h, lw)
#define HD_SCALEUP_REGN(dli, l, t, r, b)
#define LOCK_BUFFER(di, c_sz)
#define UNLOCK_BUFFER(di)

Typedefs

typedef struct _DLA_Info DLA_Info

Functions

void OSDclearDynamicLineart (void *data)
 On screen display - clear dynamic line art.
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 OSDfreeDynamicLineart (void *data)
 On screen display - free resources dla.
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 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 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 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 OSDdrawPolygonStart (void *data)
 Initialise a new draw polygon to add 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 OSDdrawPolygon (void *data, int line_width, OSDColor line_colour, OSDColor fill_colour, int filled)
 Add a draw polygon instruction 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.
void MG_OSDdisplayDynamicLineart (void *data, S_REGION *overlap, int x, int y)
 Display dynamic lineart.

Detailed Description

MHEG-5 Glue: Dynamic line-art related functions.

Date:
14 November 2006
Author:
Omri Barel

Define Documentation

#define HD_SCALEUP_RECT (   dli,
  x,
  y,
  w,
  h,
  lw 
)
Value:
if (mg_ctxt.osd_y.mlt != mg_ctxt.osd_y.div) \
   { \
      w = HD_X_SCALEUP(dli->sd_x + w + x); \
      x = HD_X_SCALEUP(dli->sd_x + x); \
      w -= x; \
      x -= HD_X_SCALEUP(dli->sd_x); \
      h = HD_Y_SCALEUP(dli->sd_y + h + y); \
      y = HD_Y_SCALEUP(dli->sd_y + y); \
      h -= y; \
      y -= HD_Y_SCALEUP(dli->sd_y); \
      if (lw) { \
         lw = HD_W_SCALEUP(lw); \
      } \
   }
#define HD_SCALEUP_REGN (   dli,
  l,
  t,
  r,
 
)
Value:
if (mg_ctxt.osd_y.mlt != mg_ctxt.osd_y.div) \
   { \
      r = HD_X_SCALEUP(dli->sd_x + r) - HD_X_SCALEUP(dli->sd_x); \
      l = HD_X_SCALEUP(dli->sd_x + l) - HD_X_SCALEUP(dli->sd_x); \
      t = HD_Y_SCALEUP(dli->sd_y + t) - HD_Y_SCALEUP(dli->sd_y); \
      b = HD_Y_SCALEUP(dli->sd_y + b) - HD_Y_SCALEUP(dli->sd_y); \
   }
#define LOCK_BUFFER (   di,
  c_sz 
)
Value:
if (di->canvas.col_buff == NULL) { \
      di->canvas.col_buff = STB_OSDMhegLockBuffer( di->canvas.hw_handle, &di->canvas.buff_pitch ); \
   }
#define UNLOCK_BUFFER (   di)
Value:
if (di->canvas.col_buff != NULL) { \
      STB_OSDMhegUnlockBuffer( di->canvas.hw_handle ); \
      di->canvas.col_buff = NULL; \
   }

Function Documentation

void MG_OSDdisplayDynamicLineart ( void *  data,
S_REGION overlap,
int  x,
int  y 
)

Display dynamic lineart.

Parameters:
void* data DLA action list
Warning:
Bug:
void OSDclearDynamicLineart ( void *  data)

On screen display - clear dynamic line art.

Parameters:
void* data Dynamic line-art object.
Warning:
Bug:
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.

Parameters:
void* data Action list int x Top left x-coord of object int y Top left y-coord of object int w Width of object int h Height of object int start_angle The initial angle of the ellipse int arc_angle The extent of the arc int line_width Width of the line used to draw the arc OSDColor line_colour The line drawing colour
Warning:
Bug:
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.

Add a draw line action to the action list.

Parameters:
void* data Pointer to action list x1 int Line start x position y1 int Line start y position x2 int Line end x position y2 int Line end y position line_width int Line pixel width line_colour OSDColour Line colour
Warning:
Bug:
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.

Parameters:
void* data Action list to be added to int x Top left x-coord of object int y Top left y-coord of object int w Width of object int h Height of object int line_width Width of the line used to draw the arc OSDColor line_colour The line drawing colour OSDColor fill_colour The fill colour of the ellipse
Warning:
Bug:
void OSDdrawPolygon ( void *  data,
int  line_width,
OSDColor  line_colour,
OSDColor  fill_colour,
int  filled 
)

Add a draw polygon instruction to the action list.

Parameters:
void* data Action list to be added to int line_width Width of the draw line OSDColor line_colour Colour of the line OSDColor fill_colour Polygon fill colour int filled Fill polygon
Warning:
Bug:
void OSDdrawPolygonAdd ( void *  data,
int  x,
int  y 
)

Add co-ordinates that describe a polygon to draw to the action list.

Parameters:
void* data Pointer to action list int x Top left x co-ord of object int y Top left y co-ord of object
Warning:
Bug:
void OSDdrawPolygonStart ( void *  data)

Initialise a new draw polygon to add to the action list.

Parameters:
void* data Pointer to action list
Warning:
Bug:
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.

Parameters:
void* data Action list to be added to int x1 1st pixel x co-ord int y1 1st pixel y co-ord int x2 2nd pixel x co-ord int y2 2nd pixel y co-ord int line_width Width of the line used to draw the arc int line_colour The line drawing colour int fill_colour The fill colour of the ellipse
Warning:
Bug:
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.

Parameters:
void* data Action list to be added to. int x Top left x-coord of object. int y Top left y-coord of object. int w Width of object. int h Height of object. int start_angle The initial angle of the ellipse int arc_angle The extent of the arc int line_width Width of the line used to draw the arc OSDColor line_colour The line drawing colour OSDColor fill_colour The fill colour of the ellipse
Warning:
Bug:
void OSDfreeDynamicLineart ( void *  data)

On screen display - free resources dla.

Parameters:
void* data Dynamic line-art object.
Warning:
Bug:
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.

Parameters:
intw Width of object int h Height of object int line_width Width of the line used to draw the arc int bordered A boolean, cuningly disguised as an int. OSDColor line_colour The line drawing colour OSDColor fill_colour The fill colour of the ellipse
Returns:
S_DLA_ACTION The action list.
Warning:
Bug:
 All Data Structures Files Functions Variables Typedefs Defines