Home » Development Area » DigiGuide Print Script » Function: DrawBox

Function: DrawBox

DrawBox( int nLeft, int nTop, int nWidth, int nHeight, String colourOuter, String colourInner, [ int nBorderWidth ] )


Draw a box of the specified location and size


Draw a box of the specified location and size. colourInner and colourOuter are standard HTML colours.

nBorderWidth is optional but allows you to change the width of the border draw in colourOuter. It defaults to 1.


int nLeft Left position of the box
int nTop Top position of the box
int nWidth Width of the box
int nHeight Height of the box
String colourOuter Colour of the border
String colourInner Colour inside the box
int nBorderWidth [optional] Border width. Default is 1.


Code taken from the default planner print template;

if( g_IncludeEPG )
SelectFont( f_strEPGFontName, f_nEPGSizePoints, f_strEPGFontBold, f_strEPGFontItalic, f_strEPGFontUnderline )
var strEPG = GetProgrammeInfo( nProg, "$ChannelAssignment")
var nWidth = GetTextWidth( strEPG );
var nHeight = GetCurrentFontHeight();
var nLeft = f_nChannelImageWidth - nWidth;
var nTop = g_nCurrentY + f_nChannelImageHeight - nHeight;
DrawBox( nLeft, nTop, nWidth, nHeight, "black", "white" );
DrawEllipsisText( nLeft, nTop, f_nChannelImageWidth, GetProgrammeInfo( nProg, "$ChannelAssignment"), f_strProgrammeFontColour )

(Last updated: September 16, 2011 10:26:32)