CPScreen

final class CPScreen(dim: CPDim, bgPixel: CPPixel) extends CPZPixelPane

Game engine view on terminal screen.

Value parameters:
bgPixel

Background pixel for the screen.

dim

Screen dimension.

Source:
CPScreen.scala
class Object
trait Matchable
class Any

Value members

Concrete methods

override def addPixel(zpx: CPZPixel, x: Int, y: Int): Unit
Definition Classes
Source:
CPScreen.scala
def apply(x: Int, y: Int): Option[CPZPixel]

Gets the pixel at given XY-coordinate.

Gets the pixel at given XY-coordinate.

Value parameters:
x

X-coordinate of the pixel to get.

y

Y-coordinate of the pixel to get.

Source:
CPScreen.scala
def clear(): Unit

Clears this screen.

Clears this screen.

Source:
CPScreen.scala
def copy(): CPScreen

Creates a new screen that is a copy of this screen.

Creates a new screen that is a copy of this screen.

Source:
CPScreen.scala
def copyTo(other: CPScreen, target: CPRect): Unit

Copies region of this screen to another screen.

Copies region of this screen to another screen.

Value parameters:
other

Other screen to copy to.

Source:
CPScreen.scala
override def equals(obj: Any): Boolean
Definition Classes
Any
Source:
CPScreen.scala
override def getBgPixel: CPPixel
Definition Classes
Source:
CPScreen.scala
override def getDim: CPDim
Definition Classes
Source:
CPScreen.scala
override def getPixel(x: Int, y: Int): CPZPixel
Definition Classes
Source:
CPScreen.scala

Gets rectangular shape of this screen.

Gets rectangular shape of this screen.

Source:
CPScreen.scala

Creates new canvas that can be used to draw on this screen.

Creates new canvas that can be used to draw on this screen.

Source:
CPScreen.scala

Creates new canvas that can be used to draw on this screen with given clipping region.

Creates new canvas that can be used to draw on this screen with given clipping region.

Value parameters:
clip

Clipping region.

Source:
CPScreen.scala
override def optPixel(x: Int, y: Int): Option[CPZPixel]
Definition Classes
Source:
CPScreen.scala

Inherited methods

def addPixel(px: CPPixel, x: Int, y: Int, z: Int): Unit

Adds pixel at given XY-coordinate and Z-index.

Adds pixel at given XY-coordinate and Z-index.

Value parameters:
px

Pixel to add.

x

X-coordinate of the pixel.

y

Y-coordinate of the pixel.

z

Z-index. Pixel with the larger or equal Z-index overrides the pixel with the smaller one.

Inherited from:
CPZPixelPane
Source:
CPZPixelPane.scala