CPArray2D

org.cosplay.CPArray2D$
See theCPArray2D companion class
object CPArray2D

Contains factory methods for 2D arrays.

Attributes

Companion
class
Source
CPArray2D.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
CPArray2D.type

Members list

Value members

Concrete methods

def apply(pps: List[CPPosPixel]): CPArray2D[CPPixel]

Creates new 2D array from given list of CPPosPixel instances. Note that clear value is not set.

Creates new 2D array from given list of CPPosPixel instances. Note that clear value is not set.

Value parameters

pps

List of CPPosPixel instances to create a new array from.

Attributes

Source
CPArray2D.scala
def apply(pxs: Seq[CPPixel], width: Int): CPArray2D[CPPixel]

Creates new 2D array from given sequence of pixels and width. The height of 2D array will be calculated as size of pixel sequence divided by the given width. To guarantee the single row 2D array make sure that pixel sequence length and width are the same.

Creates new 2D array from given sequence of pixels and width. The height of 2D array will be calculated as size of pixel sequence divided by the given width. To guarantee the single row 2D array make sure that pixel sequence length and width are the same.

Note that clear value is not set.

Value parameters

pxs

Sequence of pixels.

width

Required width. Height is calculated automatically.

Attributes

Source
CPArray2D.scala
def apply(str: String): CPArray2D[Char]

Creates new 2D array of Char from given string. Height of the array will be 1. Note that clear value will be set to ' ' (space).

Creates new 2D array of Char from given string. Height of the array will be 1. Note that clear value will be set to ' ' (space).

Value parameters

str

String to creates new 2D array from.

Attributes

Source
CPArray2D.scala
def apply(data: Seq[String]): CPArray2D[Char]

Creates new 2D array of Char from given sequence of strings. Note that clear value will be set to ' ' (space). All strings will be padded to the maximum value with clear value ' ' (space) too.

Creates new 2D array of Char from given sequence of strings. Note that clear value will be set to ' ' (space). All strings will be padded to the maximum value with clear value ' ' (space) too.

Value parameters

data

Sequence of strings to create new 2D array from.

Attributes

Source
CPArray2D.scala