C# Class SadConsole.Consoles.CachedTextSurfaceRenderer

Inheritance: ITextSurfaceRenderer, ITextSurfaceRendererUpdate
Show file Open project: Thraka/SadConsole Class Usage Examples

Public Methods

Method Description
CachedTextSurfaceRenderer ( ITextSurfaceRendered source ) : System

Creates a new renderer.

GetPositionTransform ( Point position, Point CellSize, bool absolutePositioning ) : Matrix

Gets the Matrix transform that positions the console on the screen.

Render ( ITextSurfaceRendered surface, Matrix renderingMatrix ) : void

Renders the cached surface from a previous call to the constructor or the Update(ITextSurfaceRendered) method.

Render ( ITextSurfaceRendered surface, Point position, bool usePixelPositioning = false ) : void

Renders the cached surface from a previous call to the constructor or the Update(ITextSurfaceRendered) method.

Update ( ITextSurfaceRendered source ) : void

Updates the cache based on the source surface.

Method Details

CachedTextSurfaceRenderer() public method

Creates a new renderer.
public CachedTextSurfaceRenderer ( ITextSurfaceRendered source ) : System
source ITextSurfaceRendered
return System

GetPositionTransform() public method

Gets the Matrix transform that positions the console on the screen.
public GetPositionTransform ( Point position, Point CellSize, bool absolutePositioning ) : Matrix
position Point
CellSize Point
absolutePositioning bool
return Matrix

Render() public method

Renders the cached surface from a previous call to the constructor or the Update(ITextSurfaceRendered) method.
public Render ( ITextSurfaceRendered surface, Matrix renderingMatrix ) : void
surface ITextSurfaceRendered Used only for tinting.
renderingMatrix Matrix Display matrix for the rendered console.
return void

Render() public method

Renders the cached surface from a previous call to the constructor or the Update(ITextSurfaceRendered) method.
public Render ( ITextSurfaceRendered surface, Point position, bool usePixelPositioning = false ) : void
surface ITextSurfaceRendered Only used for tinting and calculation the position from the font.
position Point Calculates the rendering position on the screen based on the size of the parameter.
usePixelPositioning bool Ignores the font for positioning and instead treats the parameter in pixels.
return void

Update() public method

Updates the cache based on the source surface.
public Update ( ITextSurfaceRendered source ) : void
source ITextSurfaceRendered The surface to render and cache.
return void