TileSheet

indigo.shared.formats.TileSheet
See theTileSheet companion object
final case class TileSheet(assetName: AssetName, imageSize: Size, tileSize: Size, margin: Int)

Utility for working with generic sprite sheets. The sheet must be uniform, with each sprite having the same width and height, and a (possibly zero-pixel) inner margin.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def apply(index: Int): Option[Graphic[Bitmap]]

Attributes

See also

#fromIndex

def apply(column: Int, row: Int): Option[Graphic[Bitmap]]

Attributes

See also

#fromCoords

def apply(pt: Point): Option[Graphic[Bitmap]]

Attributes

See also

#fromPoint

def fromCoords(column: Int, row: Int): Option[Graphic[Bitmap]]

Value parameters

column

zero-based

row

zero-based

Attributes

Returns

an optional Graphic, None if the given coordinates are out of bounds

def fromIndex(index: Int): Option[Graphic[Bitmap]]

Value parameters

index

a zero-based index that begins at the upper right of the sheet and increases as it goes right and down

Attributes

Returns

an optional Graphic, None if the given index is out of bounds

def fromPoint(pt: Point): Option[Graphic[Bitmap]]

Value parameters

pt

zero-based x and y grid location of tile

Attributes

Returns

an optional Graphic, None if the given Point is out of bounds

def graphicFromRectangle(boundsOpt: Option[Rectangle]): Option[Graphic[Bitmap]]
def rectangleForCoords(column: Int, row: Int): Option[Rectangle]
def rectangleForIndex(index: Int): Option[Rectangle]

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product

Concrete fields

val length: Int
val maxColumns: Int
val maxIndex: Int
val maxRows: Int