C# Class StdPaint.Painter

Allows drawing to the console buffer.
显示文件 Open project: TheBerkin/StdPaint

Public Properties

Property Type Description
Elements List

Public Methods

Method Description
Clear ( BufferColor clearColor = BufferColor.Black ) : void

Clears the active buffer to the specified attributes.

IsKeyDown ( Keys key ) : bool

Returns whether a specific key is pressed.

Run ( int width, int height, int bufferRefreshRate ) : void

Starts the Painter with the specified size and refresh rate.

Stop ( ) : void

Stops the Painter.

Private Methods

Method Description
AddHooks ( ) : void
ConsoleCloseEvent ( uint code ) : bool
GraphicsDrawThread ( ) : void
GraphicsRenderThread ( ) : void
InBounds ( int x, int y ) : bool
KeyboardHookCallback ( int nCode, IntPtr wParam, IntPtr lParam ) : IntPtr
MouseHookCallback ( int nCode, IntPtr wParam, IntPtr lParam ) : IntPtr

Method Details

Clear() public static method

Clears the active buffer to the specified attributes.
public static Clear ( BufferColor clearColor = BufferColor.Black ) : void
clearColor BufferColor The attributes to fill the buffer with.
return void

IsKeyDown() public static method

Returns whether a specific key is pressed.
public static IsKeyDown ( Keys key ) : bool
key Keys The key to check.
return bool

Run() public static method

Starts the Painter with the specified size and refresh rate.
public static Run ( int width, int height, int bufferRefreshRate ) : void
width int The width of the console, in units.
height int The height of the console, in units.
bufferRefreshRate int The refresh rate for the back buffer.
return void

Stop() public static method

Stops the Painter.
public static Stop ( ) : void
return void

Property Details

Elements public_oe static_oe property

Contains the GUI elements currently being displayed by the engine.
public static List Elements
return List