Home | Trees | Indices | Help |
|
---|
|
object --+ | _BaseConsole
Contains methods shared by both the Console and Window classes.
Instance Methods | |||
|
|||
|
|||
iter((x, y), ...) |
|
||
(int, (r, g, b), (r, g, b)) |
|
||
(width, height) |
|
||
iter((x, y), ...) |
|
||
Inherited from |
|||
Drawing Methods | |||
---|---|---|---|
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Printing Methods | |||
(x, y) |
|
||
|
|||
|
|||
|
|||
|
|||
|
Instance Variables | |
height The height of this console in tiles. |
|
width The width of this console in tiles. |
Properties | |
Inherited from |
Method Details |
x.__init__(...) initializes x; see help(type(x)) for signature
|
Return an iterator with every possible (x, y) value for this console. It goes without saying that working on the console this way is a slow process, especially for Python, and should be minimized.
|
Blit another console or Window onto the current console. By default it blits the entire source to the topleft corner.
|
Clears the entire Console/Window. Unlike other drawing functions, fg and bg can not be None.
See Also: draw_rect |
Draws a single character.
See Also: get_char |
Similar to draw_rect 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.
See Also: clear, draw_frame |
Draws a string starting at x and y. A string that goes past the right side will wrap around. A string wrapping 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 partially 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 print_str.
See Also: print_str |
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.
See Also: draw_char |
Return the virtual cursor position.
See Also: move |
Move the virtual cursor.
See Also: get_cursor, print_str, write |
Print a string at the virtual cursor. Handles special characters such as '\n' and '\r'. Printing past the bottom of the console will scroll everything upwards if set_mode is set to 'scroll'. Colors can be set with set_colors 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 to the default background color. Does not move the virutal cursor.
See Also: set_colors |
Sets the colors to be used with the print_str and draw_* methods. Values of None will only leave the current values unchanged.
|
Configure how this console will react to the cursor writing past the end if the console. This is for methods that use the virtual cursor, such as print_str.
|
This method mimics basic file-like behaviour. Because of this method you can replace sys.stdout or sys.stderr with a Console or Window instance. This is a convoluted process and behaviour seen now can be excepted to change on later versions.
See Also: set_colors, set_mode, Window |
Instance Variable Details |
heightThe height of this console in tiles. Do not overwrite this. |
widthThe width of this console in tiles. Do not overwrite this. |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sat May 28 16:09:37 2016 | http://epydoc.sourceforge.net |