MHEG5  15.3.0
source/graphics/inc/mg_drawtext.h File Reference

Interface to the MHEG text render that uses Freetype font library. More...

#include "mg_osd.h"
#include "mg_fontapi.h"
#include "dtvstring.h"

Go to the source code of this file.

Data Structures

struct  VRect
struct  _TextString
struct  _HyperAttribs
struct  s_FontProp
struct  _DrawTextAttrib

Defines

#define FONT_STYLE_PLAIN   0x00
#define FONT_STYLE_SQUARE   0x10
#define FONT_STYLE_NO_SCALE   0x80
#define JUSTIFY_H_START   0x00
#define JUSTIFY_H_END   0x01
#define JUSTIFY_H_CENTRE   0x02
#define JUSTIFY_H_JUSTIFIED   0x03
#define WRAP_WORDS   0x04
#define WRAP_VERTICAL   0x08
#define JFY_HZ_MASK   0x03
#define JFY_WRAP_MASK   0x0c
#define JFY_HZ_WRAP_MASK   0x0f
#define JUSTIFY_V_START   0x00
#define JUSTIFY_V_END   0x10
#define JUSTIFY_V_CENTRE   0x20
#define JUSTIFY_V_JUSTIFIED   0x30
#define JUSTIFY_VERTI_MASK   0x30
#define OBSCURED_INPUT_CHAR   ('*')
#define ENTRY_INSERT_CHAR   ('_')
#define ENTRY_OVERWRITE_CHAR   ('<')
#define HK_FNT_MAGIC   0xFEFF

Typedefs

typedef struct VRectpVRect
typedef struct _TextString TextString
typedef struct _TextStringpTextString
typedef struct _HyperAttribs HyperAttribs
typedef struct _HyperAttribspHyperAttribs
typedef struct s_FontProp S_FontProp
typedef struct _DrawTextAttrib DrawTextAttrib
typedef struct _DrawTextAttribpDrawTextAttrib

Functions

void * MG_DrawText (const TextString unistr, pDrawTextAttrib attrib, const VRect txt_box)
 Create Surface and draw text string on it and terminate freetype library.
S16BIT MG_TextWidth (const TextString unistr, pDrawTextAttrib attrib)
void MG_DrawScreenText (const TextString unistr, pDrawTextAttrib attrib, S_SURFACE *canvas)
 Single line text string drawn on existing Surface.

Detailed Description

Interface to the MHEG text render that uses Freetype font library.

Date:
28/05/2008
Author:
Adam Sturtridge

Function Documentation

void MG_DrawScreenText ( const TextString  unistr,
pDrawTextAttrib  attrib,
S_SURFACE canvas 
)

Single line text string drawn on existing Surface.

Parameters:
unistrUnicode String
attribAttributes on the string (including font data)
canvasSurface
Returns:
n/a
void* MG_DrawText ( const TextString  unistr,
pDrawTextAttrib  attrib,
const VRect  txt_box 
)

Create Surface and draw text string on it and terminate freetype library.

Parameters:
unistrUnicode String to display
attribAttributes on the string (including font data)
txt_boxRectangle in SD pixel size
Returns:
handle to surface, NULL if no text can be drawn in box
Parameters:
unistrUnicode String
attribAttributes on the string (including font data)
txt_boxRectangle in SD pixel size
Returns:
pointer to surface, NULL if no text can be drawn in box
S16BIT MG_TextWidth ( const TextString  unistr,
pDrawTextAttrib  attrib 
)
Parameters:
unistrUnicode String
attribAttributes on the string (including font data)
f_szPointer to font size data
Returns:
pointer to surface, NULL if no text can be drawn in box
Parameters:
unistrUnicode String
attribAttributes on the string (including font data)
Returns:
width of text in pixels
 All Data Structures Files Functions Variables Typedefs Defines