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 ] )

Summary

Draw a box of the specified location and size


Remarks

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.


Parameters

ParameterDescription
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.


Examples

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: February 13, 2020 12:43:32)