REXPaintImage Class
Definition
Section titled “Definition”A RexPaint image.
public class REXPaintImageInheritance object
Constructors
Section titled “Constructors”REXPaintImage(int, int)
Section titled “REXPaintImage(int, int)”Creates a new RexPaint image.
public REXPaintImage(int width, int height)Parameters
Section titled “Parameters”width int
The width of the image.
height int
The height of the image.
Properties
Section titled “Properties”Version
Section titled “Version”The version of RexPaint that created this image.
public int Version { get; }The width of the image.
public int Width { get; }Height
Section titled “Height”The height of the image.
public int Height { get; }LayerCount
Section titled “LayerCount”The total number of layers for this image.
public int LayerCount { get; }Layers
Section titled “Layers”A read-only collection of layers.
public ReadOnlyCollection<REXPaintImage.Layer> Layers { get; }Methods
Section titled “Methods”Create()
Section titled “Create()”Creates a new layer for the image adding it to the end of the layer stack.
public REXPaintImage.Layer Create()Returns
Section titled “Returns”REXPaintImage.Layer
A new layer.
Create(int)
Section titled “Create(int)”Creates a new layer for the image and inserts it at the specified position (0-based).
public REXPaintImage.Layer Create(int index)Parameters
Section titled “Parameters”index int
The position to create the new layer at.
Returns
Section titled “Returns”REXPaintImage.Layer
A new layer.
Add(Layer)
Section titled “Add(Layer)”Adds an existing layer (must be the same width/height) to the image.
public void Add(REXPaintImage.Layer layer)Parameters
Section titled “Parameters”layer REXPaintImage.Layer
The layer to add.
Add(Layer, int)
Section titled “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).
public void Add(REXPaintImage.Layer layer, int index)Parameters
Section titled “Parameters”layer REXPaintImage.Layer
The layer to add.
index int
The position to add the layer.
Remove(Layer)
Section titled “Remove(Layer)”Removes the specified layer.
public void Remove(REXPaintImage.Layer layer)Parameters
Section titled “Parameters”layer REXPaintImage.Layer
The layer.
ToCellSurface()
Section titled “ToCellSurface()”Converts each layer in this REXPaint image to CellSurface.
public ICellSurface[] ToCellSurface()Returns
Section titled “Returns”ICellSurface[]
An array of each converted layer.
Load(Stream)
Section titled “Load(Stream)”Loads a .xp RexPaint image from a GZip compressed stream.
public static REXPaintImage Load(Stream stream)Parameters
Section titled “Parameters”stream Stream
The GZip stream to load.
Returns
Section titled “Returns”REXPaintImage
The RexPaint image.