TGDI_Area
(derives from TKernel_DataStreamableObject)
All tornado GDI operations are done by sending GDI operations down a data stream and
TGDI_Area is the main template class for tornado GDI operations which provides the implementation
of GDI operations on the host operating systems but allows derived classes to determine on
what the operations are done.
- Constants defined:
- TGDI_DSC_REQUESTAREA, taking TCore_Rectangle *
Sent to request the GDI area outputs the requested area (specified by the
TCore_Rectangle)
- TGDI_DSC_SETFGCOLOUR, taking TCore_Colour *
Sent to set the GDI area's current foreground colour
- TGDI_DSC_MOVETO, taking s32[2] *
Sent to set the GDI area's current cursor position
- TGDI_DSC_MOVEBY, taking s32[2] *
Sent to offset the GDI area's current cursor position
- TGDI_DSC_DRAWBY, taking s32[2] *
Sent to request the GDI area draw a line from the current cursor position to the
offsetted position specified
- TGDI_DSC_WRITETEXT, taking TCore_String *
Sent to request the GDI area draw the string specified at the current cursor
position
- Constructors:
- Attributes:
- s32 x1, y1, x2, y2
These are the dimensions of the GDI surface this object represents. Effectively,
x1 and y1 are the origin (as all GDI surfaces work from the bottom left corner out) and
x2-x1 and y2-y1 are the width and height of the GDI surface. Note that y2-y1 can be
negative, indicating a top-left corner down (ie; now the GDI surface works from the top
left out).
- s32 cposx, cposy
These are the current cursor position within the GDI surface. These are offsets
from x1,y1.
- TCore_Colour fgcolour,bgcolour
The current foreground and background colours respectively
- Methods:
- void setDimensions(s32 x1, s32 y1, s32 x2, s32 y2)
Sets x1,y1,x2,y2 attributes
- inline s32 getWidth()
Returns the width of the GDI area. Always positive.
- inline s32 getHeight()
Returns the height of the GDI area. Always positive.
(C) 1998 The Tornado II programming team (Last
updated: 15 March 2009 19:01:53 -0000)