Skip to content

REXPaintImage Class

A RexPaint image.

C#
public class REXPaintImage

Inheritance object

Creates a new RexPaint image.

C#
public REXPaintImage(int width, int height)

width int
The width of the image.

height int
The height of the image.

The version of RexPaint that created this image.

C#
public int Version { get; }

The width of the image.

C#
public int Width { get; }

The height of the image.

C#
public int Height { get; }

The total number of layers for this image.

C#
public int LayerCount { get; }

A read-only collection of layers.

C#
public ReadOnlyCollection<REXPaintImage.Layer> Layers { get; }

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

C#
public REXPaintImage.Layer Create()

REXPaintImage.Layer
A new layer.

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

C#
public REXPaintImage.Layer Create(int index)

index int
The position to create the new layer at.

REXPaintImage.Layer
A new layer.

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

C#
public void Add(REXPaintImage.Layer layer)

layer REXPaintImage.Layer
The layer to add.

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

C#
public void Add(REXPaintImage.Layer layer, int index)

layer REXPaintImage.Layer
The layer to add.

index int
The position to add the layer.

Removes the specified layer.

C#
public void Remove(REXPaintImage.Layer layer)

layer REXPaintImage.Layer
The layer.

Converts each layer in this REXPaint image to CellSurface.

C#
public ICellSurface[] ToCellSurface()

ICellSurface[]
An array of each converted layer.

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

C#
public static REXPaintImage Load(Stream stream)

stream Stream
The GZip stream to load.

REXPaintImage
The RexPaint image.