Skip to content

TextureToSurfaceReader Class

Reads a texture to a cached surface. Used for animation.

C#
public class TextureToSurfaceReader

Inheritance object

TextureToSurfaceReader(int, int, IFont, Point)

Section titled “TextureToSurfaceReader(int, int, IFont, Point)”

Creates a new instance of the class.

C#
public TextureToSurfaceReader(int pixelWidth, int pixelHeight, IFont font, Point fontSize)

pixelWidth int
Width the source texture.

pixelHeight int
Height of the source texture.

font IFont
Font used for rendering.

fontSize SadRogue.Primitives.Point
Size of the font.

Renders the cells as blocks instead of characters.

C#
public bool UseBlockMode { get; set; }

Returns a surface with the specified image rendered to it as characters.

C#
public Console GetSurface(Texture2D image)

image Microsoft.Xna.Framework.Graphics.Texture2D
The image to render.

Console
The surface.