implicit final class GreyOrRGBExtension[T] extends AnyVal
- Alphabetic
- By Inheritance
- GreyOrRGBExtension
- AnyVal
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
broadcastToRGB: TupleRGB[T]
If this instance is monochromatic, it will be broadcast to a three channel representation.
-
def
combine[B, C](other: GreyOrRGB[B])(combiner: (T, B) ⇒ C): GreyOrRGB[C]
Combines two instances of GreyOrRGB component-wise.
Combines two instances of GreyOrRGB component-wise. If one instance is monochromatic while the other has three channels, the monochromatic instance will be broadcast to three channels (c.f. broadcast()).
-
def
forAllChannels[R](f: (T) ⇒ Boolean): Boolean
Tests a conditions for all channels.
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
def
isGrey: Boolean
Checks whether this instance represents a monochromatic value.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isRGB: Boolean
Checks whether this instance represents a colored value.
-
def
mapFirstChannel[R](f: (T) ⇒ R): R
Applies a function to the first color channel only (i.e.
Applies a function to the first color channel only (i.e. monochromatic channel or red for RGB). The result always has one channel only.
-
def
mapGreyOrRGB[R](f: (T) ⇒ R): GreyOrRGB[R]
Applies a function to each color channel individually.
-
def
projectToGrey: T
If this instance has three channels, the first one is returned.
- val thiz: GreyOrRGB[T]
-
def
toString(): String
- Definition Classes
- Any