Table of Contents

Class Image

Namespace
Termule.Engine.Types
Assembly
Termule.Engine.dll

Content implementation with methods for easy modification.

public class Image : IContent, IResource
Inheritance
Image
Implements
Derived
Inherited Members

Constructors

Image(int, int)

Initializes a new instance of the Image class.

public Image(int width, int height)

Parameters

width int

The width in cells.

height int

The height in cells.

Image(Image)

Initializes a new instance of the Image class.

public Image(Image i)

Parameters

i Image

The image whose cells should be duplicated.

Properties

Cells

Gets or sets the array of Cells that make up this content.

[JsonInclude]
protected Cell[,] Cells { get; set; }

Property Value

Cell[,]

this[int, int]

Gets or sets the cell at (x, y).

public Cell this[int x, int y] { get; set; }

Parameters

x int

The x position of the cell.

y int

The y position of the cell.

Property Value

Cell

The Cell at the given position.

Size

Gets the size of this content.

[JsonIgnore]
public VectorInt Size { get; }

Property Value

VectorInt

Methods

Resize(int, int)

Resizes this image to the specified dimensions.

protected void Resize(int width, int height)

Parameters

width int

The new width.

height int

The new height.

Exceptions

ArgumentOutOfRangeException

Thrown if width or height is negative.