CPPixel

org.cosplay.CPPixel$
See theCPPixel companion class
object CPPixel

Companion object with utility functions.

Attributes

Companion
class
Source
CPPixel.scala
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
CPPixel.type

Members list

Type members

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
Source
Mirror.scala
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror
Source
Mirror.scala

Value members

Concrete methods

def apply(char: Char, fg: CPColor): CPPixel

Creates new pixel without background and default zero tag.

Creates new pixel without background and default zero tag.

Value parameters

char

Pixel character.

fg

Pixel foreground.

Attributes

Note

Pixel tag will be set to zero.

Source
CPPixel.scala
def apply(char: Char, fg: CPColor, tag: Int): CPPixel

Creates new pixel without background.

Creates new pixel without background.

Value parameters

char

Pixel character.

fg

Pixel foreground.

tag

Pixel tag.

Attributes

Source
CPPixel.scala
def apply(char: Char, fg: CPColor, bg: CPColor): CPPixel

Creates new pixel.

Creates new pixel.

Value parameters

bg

Pixel background.

char

Pixel character.

fg

Pixel foreground.

Attributes

Note

Pixel tag will be set to zero.

Source
CPPixel.scala
def apply(char: Char, fg: CPColor, bg: Option[CPColor]): CPPixel

Creates new pixel.

Creates new pixel.

Value parameters

bg

Optional pixel background.

char

Pixel character.

fg

Pixel foreground.

Attributes

Note

Pixel tag will be set to zero.

Source
CPPixel.scala
def apply(char: Char, fg: CPColor, bg: CPColor, tag: Int): CPPixel

Creates new pixel.

Creates new pixel.

Value parameters

bg

Pixel background.

char

Pixel character.

fg

Pixel foreground.

tag

Pixel tag.

Attributes

Source
CPPixel.scala
def apply(char: Char, fg: CPColor, bg: Option[CPColor], tag: Int): CPPixel

Creates new pixel.

Creates new pixel.

Value parameters

bg

Optional pixel background.

char

Pixel character.

fg

Pixel foreground.

tag

Pixel tag.

Attributes

Source
CPPixel.scala
def seq(first: Char, last: Char, fg: CPColor, bg: Option[CPColor]): Seq[CPPixel]

Makes a sequence of pixel from the range of characters. Range must be sequential.

Makes a sequence of pixel from the range of characters. Range must be sequential.

Value parameters

bg

Background color.

fg

Foreground color.

first

First character in the range.

last

Last character in the range.

Attributes

Note

Pixel tag will be set to zero.

Source
CPPixel.scala
def seq(first: Char, last: Char, fgf: Char => CPColor, bgf: Char => Option[CPColor]): Seq[CPPixel]

Makes a sequence of pixel from the range of characters. Range must be sequential.

Makes a sequence of pixel from the range of characters. Range must be sequential.

Value parameters

bgf

Function for background color.

fgf

Function for foreground color.

first

First character in the range.

last

Last character in the range.

Attributes

Note

Pixel tag will be set to zero.

Source
CPPixel.scala
def seq(chars: String, fg: CPColor, bg: Option[CPColor]): Seq[CPPixel]

Makes a sequence of pixel from given string.

Makes a sequence of pixel from given string.

Value parameters

bg

Background color.

chars

Sequence of characters.

fg

Foreground color.

Attributes

Note

Pixel tag will be set to zero.

Source
CPPixel.scala
def seq(chars: String, fgf: Char => CPColor, bgf: Char => Option[CPColor]): Seq[CPPixel]

Makes a sequence of pixel from given string.

Makes a sequence of pixel from given string.

Value parameters

bgf

Function for background color.

chars

Sequence of characters.

fgf

Function for foreground color.

Attributes

Note

Pixel tag will be set to zero.

Source
CPPixel.scala

Concrete fields

val XRAY: CPPixel

Transparent non-rendering pixel. Background and foreground are unused. Note that this pixel is never rendered on any terminal. It can only be used internally for drawing on canvas, creating images, etc.

Transparent non-rendering pixel. Background and foreground are unused. Note that this pixel is never rendered on any terminal. It can only be used internally for drawing on canvas, creating images, etc.

Attributes

Source
CPPixel.scala

Extensions

Extensions

extension (ch: Char)(ch: Char)
infix def &(c: CPColor): CPPixel

Adds '&' operator to Char type as a sugar to create pixel without background. For example:

Adds '&' operator to Char type as a sugar to create pixel without background. For example:

   val x = 'x'&C_BLACK
   val ch = 'a'
   val a = ch&C_WHITE

Attributes

Source
CPPixel.scala
infix def &&(fg: CPColor, bg: CPColor | Option[CPColor]): CPPixel

Adds '&&' operator to Char type as a sugar to create pixel with background. For example:

Adds '&&' operator to Char type as a sugar to create pixel with background. For example:

   val x1 = 'x'&&(C_BLACK, C_WHITE)
   val x2 = 'x'&&(C_BLACK, C_WHITE.?)
   val ch = 'a'
   val a = ch&&(C_WHITE, C_PINK.?)

Note that background can be either of type CPColor or Option[CPColor].

Attributes

Source
CPPixel.scala