Show / Hide Table of Contents

Class REXPaintImage

A RexPaint image.

Inheritance
object
REXPaintImage
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: SadConsole.Readers
Assembly: SadConsole.dll
Syntax
public class REXPaintImage

Constructors

REXPaintImage(int, int)

Creates a new RexPaint image.

Declaration
public REXPaintImage(int width, int height)
Parameters
Type Name Description
int width

The width of the image.

int height

The height of the image.

Properties

Height

The height of the image.

Declaration
public int Height { get; }
Property Value
Type Description
int

LayerCount

The total number of layers for this image.

Declaration
public int LayerCount { get; }
Property Value
Type Description
int

Layers

A read-only collection of layers.

Declaration
public ReadOnlyCollection<REXPaintImage.Layer> Layers { get; }
Property Value
Type Description
ReadOnlyCollection<REXPaintImage.Layer>

Version

The version of RexPaint that created this image.

Declaration
public int Version { get; }
Property Value
Type Description
int

Width

The width of the image.

Declaration
public int Width { get; }
Property Value
Type Description
int

Methods

Add(Layer)

Adds an existing layer (must be the same width/height) to the image.

Declaration
public void Add(REXPaintImage.Layer layer)
Parameters
Type Name Description
REXPaintImage.Layer layer

The layer to add.

Add(Layer, int)

Adds an existing layer (must be the same width/height) to the image and inserts it at the specified position (0-based).

Declaration
public void Add(REXPaintImage.Layer layer, int index)
Parameters
Type Name Description
REXPaintImage.Layer layer

The layer to add.

int index

The position to add the layer.

Create()

Creates a new layer for the image adding it to the end of the layer stack.

Declaration
public REXPaintImage.Layer Create()
Returns
Type Description
REXPaintImage.Layer

A new layer.

Create(int)

Creates a new layer for the image and inserts it at the specified position (0-based).

Declaration
public REXPaintImage.Layer Create(int index)
Parameters
Type Name Description
int index

The position to create the new layer at.

Returns
Type Description
REXPaintImage.Layer

A new layer.

Load(Stream)

Loads a .xp RexPaint image from a GZip compressed stream.

Declaration
public static REXPaintImage Load(Stream stream)
Parameters
Type Name Description
Stream stream

The GZip stream to load.

Returns
Type Description
REXPaintImage

The RexPaint image.

Remove(Layer)

Removes the specified layer.

Declaration
public void Remove(REXPaintImage.Layer layer)
Parameters
Type Name Description
REXPaintImage.Layer layer

The layer.

ToCellSurface()

Converts each layer in this REXPaint image to CellSurface.

Declaration
public ICellSurface[] ToCellSurface()
Returns
Type Description
ICellSurface[]

An array of each converted layer.

Extension Methods

ExtensionsSystem.GetDebuggerDisplayValue(object)
In this article

Back to top

Back to top Generated by DocFX