Class DrawContext : fillRect Method
void fillRect( String colour, [ Rect rc ], [ Integer left ], [ Integer top ], [ Integer right ], [ Integer bottom ] ) |
Summary
Draw a solid filled rectangle
Parameters
Parameter | Description |
String colour |
Colour to use |
Rect rc [optional] |
Rectangle to use (or you could use the four coordinates instead) |
Integer left [optional] |
Upper-left of the rectangle |
Integer top [optional] |
Upper-left of the rectangle |
Integer right [optional] |
Bottom-right of the rectangle |
Integer bottom [optional] |
Bottom-right of the rectangle |
|
|
|
Examples
c.onDraw = function ( dc, rc, textColour, programme ) { dc.fillRect( "red", rc ); dc.drawEllipsisText( rc.left, rc.top, rc.right, programme.channel.name, textColour ); }
|
Or we could draw an ugly rectangle around it... c.onDraw = function ( dc, rc, textColour, programme ) { dc.fillRect( "red", rc.left, rc.top, rc.right, rc.top + 1 ); dc.fillRect( "red", rc.right - 1, rc.top, rc.right, rc.bottom ); dc.fillRect( "red", rc.left, rc.bottom - 1, rc.right, rc.bottom ); dc.fillRect( "red", rc.left, rc.top, rc.left + 1, rc.bottom ); dc.drawEllipsisText( rc.left, rc.top, rc.right, programme.channel.name, textColour ); }
|
Requirements
build 1065
|