RamSurface

final class RamSurface(val data: Vector[Array[Color]]) extends MutableSurface

A mutable surface stored in RAM.

Value parameters:
data

the raw data that backs this surface

trait Surface
class Object
trait Matchable
class Any

Value members

Constructors

def this(colors: Seq[Seq[Color]])

Concrete methods

def fill(color: Color): Unit
def getPixel(x: Int, y: Int): Option[Color]
def getPixels(): Vector[Array[Color]]
def putPixel(x: Int, y: Int, color: Color): Unit

Inherited methods

def blit(that: Surface, mask: Option[Color])(x: Int, y: Int, cx: Int, cy: Int, cw: Int, ch: Int): Unit

Draws a surface on top of this surface.

Draws a surface on top of this surface.

Value parameters:
ch

clip height of the source surface

cw

clip width of the source surface

cx

leftmost pixel on the source surface

cy

topmost pixel on the source surface

mask

color to use as a mask (pixels with this color won't be merged)

that

surface to draw

x

leftmost pixel on the destination surface

y

topmost pixel on the destination surface

Inherited from:
MutableSurface

Copies this surface into a new surface stored in RAM

Copies this surface into a new surface stored in RAM

Inherited from:
Surface

Returns a view over this surface.

Returns a view over this surface.

Operations performed on a view are executed in a defered fashion.

Inherited from:
Surface

Deprecated and Inherited methods

@deprecated("Use blit instead")
def blitWithMask(that: Surface, mask: Color)(x: Int, y: Int, cx: Int, cy: Int, cw: Int, ch: Int): Unit

Draws a surface on top of this surface and masks the pixels with a certain color.

Draws a surface on top of this surface and masks the pixels with a certain color.

Value parameters:
ch

clip height of the source surface

cw

clip width of the source surface

cx

leftmost pixel on the source surface

cy

topmost pixel on the source surface

mask

color to usa as a mask

that

surface to draw

x

leftmost pixel on the destination surface

y

topmost pixel on the destination surface

Deprecated
Inherited from:
MutableSurface

Concrete fields

val data: Vector[Array[Color]]
val height: Int
val width: Int