Home | Trees | Indices | Help |
|
---|
|
object --+ | _MetaConsole
Contains methods shared by both the Console and Window classes.
Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
(int, (r, g, b), (r, g, b)) |
|
||
(int, int) |
|
||
(int, int) |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
Properties | |
console | |
height | |
width | |
Inherited from |
Method Details |
x.__init__(...) initializes x; see help(type(x)) for signature
|
Blit another console or Window onto the current console. By default it blits the entire source to the topleft corner.
|
Draws a single character.
|
Similar to drawRect but only draws the outline of the rectangle.
|
Draws a rectangle starting from x and y and extending to width and height. If width or height are None then it will extend to the edge of the console.
|
Draws a string starting at x and y. Optinally colored. A string that goes past the right side will wrap around. A string wraping to below the console will raise a TDLError but will still be written out. This means you can safely ignore the errors with a try... except block if you're fine with partily written strings. \r and \n are drawn on the console as normal character tiles. No special encoding is done and any string will translate to the character table as is. For a string drawing operation that respects special characters see the Typewriter class.
|
Return the character and colors of a tile as (ch, fg, bg) This method runs very slowly as is not recommended to be called frequently.
|
Return the virtual cursor position.
|
Move the virtual cursor.
|
Print a string at the virtual cursor. Handles special characters such as '\n' and '\r'. Printing past the bottom of the console will scroll everying upwards. Colors can be set with setColors and the virtual cursor can be moved with move.
|
Scroll the contents of the console in the direction of x,y. Uncovered areas will be cleared. Does not move the virutal cursor.
|
Sets the colors to be used with the printStr function. Values of None will only leave the current values unchanged. |
This method mimics basic file-like behaviour. Because of this method you can replace sys.stdout or sys.stderr with a Typewriter instance. This is a convoluted process and behaviour seen now can be excepted to change on later versions.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Mar 06 19:00:12 2013 | http://epydoc.sourceforge.net |