C6000 graphics overlay system
Full Description Graphics overlay system is a high quality graphic object blending tool which is suitable to use with embedded video applications. This library is originally developed to blend graphical objects to a D1 PAL (720 x 576 x 25fps) video source on Ti c6000 platform. Apart from that, it is also capable to draw another video source as Picture in Picture (PIP) to the main video source. A PC program (available with source) is used to convert any standard PC font into a compressed, embeddable font. The fonts are anti-aliased, alpha blended, can be of almost any size and are proportionally spaced. Any number of fonts can be used in the application, only limited by memory. Bitmaps A PC program (available with source) is used to convert a graphics image in most common formats to the format required by the overlay system. Apart from the base image, a second monochrome image that represnts alpha values can also be specified to control the opacity of each pixel. In addition to that image with alpha values, an overall alpha level can also be specified. Lines A fast anti-aliased line drawing based on integer arithmatic is used to draw straight lines on the screen. Typically these are ideal for use as indication needles on dials and gauges. Circles Fast anti-alised circles based on integer arithmatic is used. PIP (Picture In Picture) Assign a video source to appear inside a small rectangular area of the main video frame. In addition, a border width can also be specified to distinguish the background. PC baseed Overlay Design Tool can be used to design attractive customised overlay designs to use by this system. The number of objects from each type is restricted only by available memory. Performance Parameters RAM requirements: xxkB minimum, typicall xxkB Typical code space requirements: xxkB Typical speed: 30 Graphical objects at 10% processor load (DM642 720 MHz) C6000 graphics overlay system Application Programming Interface 1. void DrawAALine ( int x1, int y1, int x2, int y2, unsigned char y, unsigned char u, unsigned char v, unsigned char ThickLine, unsigned short Alpha, unsigned int line1, unsigned int line2 ) This function draws an anti-aliased line to the global canvas. Parameters: x1, y1 - Start position x2, y2 - End position y, u, v - Colour in YUV format ThickLine - 0 - Normal Line 1-Think Line Alpha - Opacity control [0..255] 0 - invisible, 255 - Opaque Line1, line2 - Upper & lower values of Overlay Block 2. void BlendRectangle ( int x1, int y1, int x2, int y2, unsigned char y, unsigned char u, unsigned char v, unsigned int row1, unsigned int row2, unsigned short alpha_c ) This function blends a filled Rectangle to the global canvas. Parameters: x1, y1 - Top-left position x2, y2 - Right-Bottom position y, u, v - Colour in YUV format row1, row2 - Upper & lower values of Overlay Block alpha_c - Opacity control [0..255] 0 - invisible, 255 - Opaque 3. void DrawRectangle ( int x1, int y1, int x2, int y2, unsigned char y, unsigned char u, unsigned char v, unsigned short row1, unsigned short row2) This function draws a opaque filled Rectangle to the global canvas. Parameters: x1, y1 - Top-left position x2, y2 - Right-Bottom position y, u, v - Colour in YUV format row1, row2 - Upper & lower values of Overlay Block 4. void Draw_BMP ( int top_y, bitmap *bmp) This function blends a BMP given by the bmp object. Parameters: top_y - upper value of Overlay block bmp - Bitmap object 5. void OpenFont ( unsigned char *fn_array, RTGlyph *rtg) Opens & initializes an RTG font file. This must be used before using a font type. Parameters: fn_array - Start position of RTG font rtg - Font object to be initialised for this font 6. void BlendText_left ( int blk_top, int blk_bottom, RTGlyph *rtg, char *text, short textlen, short x, short y, unsigned char lum, unsigned char chro_u, unsigned char chro_v, unsigned char alpha_c) This function is used to blend a left aligned text to the global canvas. Parameters: blk_top, blk_bottom - Upper & lower values of Overlay Block rtg - Font to be used to print this text text - Text buffer representing the string to be printed textlen - Number of characters in the Text x, y - Left position of the text lum, chro_u, chro_v - Colour in YUV format alpha_c - Opacity control [0..255] 0 - invisible, 255 - Opaque 7. void BlendText_right ( int blk_top, int blk_bottom, RTGlyph *rtg, char *text, short textlen, short x, short y, unsigned char lum, unsigned char chro_u, unsigned char chro_v, unsigned char alpha_c) This function is used to blend a right aligned text to the global canvas. Parameters: blk_top, blk_bottom - Upper & lower values of Overlay Block rtg - Font to be used to print this text text - Text buffer representing the string to be printed textlen - Number of characters in the Text x, y - Right position of the text lum, chro_u, chro_v - Colour in YUV format alpha_c - Opacity control [0..255] 0 - invisible, 255 - Opaque 8. void CentreCoord ( RTGlyph *rtg, char *text, short textlen, int *leftPos, int *botPos) This function is used to find the centre of a given text string. Parameters: rtg - Font to be used to print this text text - Text buffer representing the string to be printed textlen - Number of characters in the Text leftPos - X postion botPos - Y position void closeFont ( RTGlyph *rtg) This function is used to close an already open font object. Parameters: rtg - Font object This page was printed from: http://www.hynav.com/index.php?pcat=2&cat=7493&lang=1 © Race Technology Ltd '24 |