luminance-0.11.0.4: Type-safe, type-level and stateless graphics framework

Copyright(C) 2015, 2016 Dimitri Sabadie
LicenseBSD3
MaintainerDimitri Sabadie <dimitri.sabadie@gmail.com>
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Graphics.Luminance.Pixel

Contents

Description

 

Synopsis

Channel size

data C8 Source #

A 8-bit channel.

Constructors

C8 

Instances

Eq C8 Source # 

Methods

(==) :: C8 -> C8 -> Bool #

(/=) :: C8 -> C8 -> Bool #

Ord C8 Source # 

Methods

compare :: C8 -> C8 -> Ordering #

(<) :: C8 -> C8 -> Bool #

(<=) :: C8 -> C8 -> Bool #

(>) :: C8 -> C8 -> Bool #

(>=) :: C8 -> C8 -> Bool #

max :: C8 -> C8 -> C8 #

min :: C8 -> C8 -> C8 #

Show C8 Source # 

Methods

showsPrec :: Int -> C8 -> ShowS #

show :: C8 -> String #

showList :: [C8] -> ShowS #

Pixel RGBA8UI Source # 

Associated Types

type PixelBase RGBA8UI :: *

Pixel RGB8UI Source # 

Associated Types

type PixelBase RGB8UI :: *

data C16 Source #

A 16-bit channel.

Constructors

C16 

Instances

Eq C16 Source # 

Methods

(==) :: C16 -> C16 -> Bool #

(/=) :: C16 -> C16 -> Bool #

Ord C16 Source # 

Methods

compare :: C16 -> C16 -> Ordering #

(<) :: C16 -> C16 -> Bool #

(<=) :: C16 -> C16 -> Bool #

(>) :: C16 -> C16 -> Bool #

(>=) :: C16 -> C16 -> Bool #

max :: C16 -> C16 -> C16 #

min :: C16 -> C16 -> C16 #

Show C16 Source # 

Methods

showsPrec :: Int -> C16 -> ShowS #

show :: C16 -> String #

showList :: [C16] -> ShowS #

data C32 Source #

A 32-bit channel.

Constructors

C32 

Instances

Eq C32 Source # 

Methods

(==) :: C32 -> C32 -> Bool #

(/=) :: C32 -> C32 -> Bool #

Ord C32 Source # 

Methods

compare :: C32 -> C32 -> Ordering #

(<) :: C32 -> C32 -> Bool #

(<=) :: C32 -> C32 -> Bool #

(>) :: C32 -> C32 -> Bool #

(>=) :: C32 -> C32 -> Bool #

max :: C32 -> C32 -> C32 #

min :: C32 -> C32 -> C32 #

Show C32 Source # 

Methods

showsPrec :: Int -> C32 -> ShowS #

show :: C32 -> String #

showList :: [C32] -> ShowS #

Pixel Depth32F Source # 

Associated Types

type PixelBase Depth32F :: *

Pixel RGBA32F Source # 

Associated Types

type PixelBase RGBA32F :: *

Pixel RGB32F Source # 

Associated Types

type PixelBase RGB32F :: *

Channel type

data CInts Source #

Channels are integral values.

Constructors

CInts 

Instances

Eq CInts Source # 

Methods

(==) :: CInts -> CInts -> Bool #

(/=) :: CInts -> CInts -> Bool #

Ord CInts Source # 

Methods

compare :: CInts -> CInts -> Ordering #

(<) :: CInts -> CInts -> Bool #

(<=) :: CInts -> CInts -> Bool #

(>) :: CInts -> CInts -> Bool #

(>=) :: CInts -> CInts -> Bool #

max :: CInts -> CInts -> CInts #

min :: CInts -> CInts -> CInts #

Show CInts Source # 

Methods

showsPrec :: Int -> CInts -> ShowS #

show :: CInts -> String #

showList :: [CInts] -> ShowS #

data CUInts Source #

Channels are unsigned integral values.

Constructors

CUInts 

Instances

Eq CUInts Source # 

Methods

(==) :: CUInts -> CUInts -> Bool #

(/=) :: CUInts -> CUInts -> Bool #

Ord CUInts Source # 
Show CUInts Source # 
Pixel RGBA8UI Source # 

Associated Types

type PixelBase RGBA8UI :: *

Pixel RGB8UI Source # 

Associated Types

type PixelBase RGB8UI :: *

data CFloats Source #

Channels are floating values.

Constructors

CFloats 

Instances

Eq CFloats Source # 

Methods

(==) :: CFloats -> CFloats -> Bool #

(/=) :: CFloats -> CFloats -> Bool #

Ord CFloats Source # 
Show CFloats Source # 
Pixel Depth32F Source # 

Associated Types

type PixelBase Depth32F :: *

Pixel RGBA32F Source # 

Associated Types

type PixelBase RGBA32F :: *

Pixel RGB32F Source # 

Associated Types

type PixelBase RGB32F :: *

Channel shape

data CR a Source #

A red channel only.

Constructors

CR 

Instances

Eq (CR a) Source # 

Methods

(==) :: CR a -> CR a -> Bool #

(/=) :: CR a -> CR a -> Bool #

Ord (CR a) Source # 

Methods

compare :: CR a -> CR a -> Ordering #

(<) :: CR a -> CR a -> Bool #

(<=) :: CR a -> CR a -> Bool #

(>) :: CR a -> CR a -> Bool #

(>=) :: CR a -> CR a -> Bool #

max :: CR a -> CR a -> CR a #

min :: CR a -> CR a -> CR a #

Show (CR a) Source # 

Methods

showsPrec :: Int -> CR a -> ShowS #

show :: CR a -> String #

showList :: [CR a] -> ShowS #

Pixel (Format t (CR r)) => ColorPixel (Format t (CR r)) Source # 

data CRG a b Source #

Rd and green channels.

Constructors

CRG 

Instances

Eq (CRG a b) Source # 

Methods

(==) :: CRG a b -> CRG a b -> Bool #

(/=) :: CRG a b -> CRG a b -> Bool #

Ord (CRG a b) Source # 

Methods

compare :: CRG a b -> CRG a b -> Ordering #

(<) :: CRG a b -> CRG a b -> Bool #

(<=) :: CRG a b -> CRG a b -> Bool #

(>) :: CRG a b -> CRG a b -> Bool #

(>=) :: CRG a b -> CRG a b -> Bool #

max :: CRG a b -> CRG a b -> CRG a b #

min :: CRG a b -> CRG a b -> CRG a b #

Show (CRG a b) Source # 

Methods

showsPrec :: Int -> CRG a b -> ShowS #

show :: CRG a b -> String #

showList :: [CRG a b] -> ShowS #

Pixel (Format t (CRG r g)) => ColorPixel (Format t (CRG r g)) Source # 

data CRGB a b c Source #

Red, green and blue channels.

Constructors

CRGB 

Instances

Pixel RGB32F Source # 

Associated Types

type PixelBase RGB32F :: *

Pixel RGB8UI Source # 

Associated Types

type PixelBase RGB8UI :: *

Pixel (Format t (CRGB r g b)) => ColorPixel (Format t (CRGB r g b)) Source # 
Eq (CRGB a b c) Source # 

Methods

(==) :: CRGB a b c -> CRGB a b c -> Bool #

(/=) :: CRGB a b c -> CRGB a b c -> Bool #

Ord (CRGB a b c) Source # 

Methods

compare :: CRGB a b c -> CRGB a b c -> Ordering #

(<) :: CRGB a b c -> CRGB a b c -> Bool #

(<=) :: CRGB a b c -> CRGB a b c -> Bool #

(>) :: CRGB a b c -> CRGB a b c -> Bool #

(>=) :: CRGB a b c -> CRGB a b c -> Bool #

max :: CRGB a b c -> CRGB a b c -> CRGB a b c #

min :: CRGB a b c -> CRGB a b c -> CRGB a b c #

Show (CRGB a b c) Source # 

Methods

showsPrec :: Int -> CRGB a b c -> ShowS #

show :: CRGB a b c -> String #

showList :: [CRGB a b c] -> ShowS #

data CRGBA a b c d Source #

Red, green, blue and alpha channels.

Constructors

CRGBA 

Instances

Pixel RGBA32F Source # 

Associated Types

type PixelBase RGBA32F :: *

Pixel RGBA8UI Source # 

Associated Types

type PixelBase RGBA8UI :: *

Pixel (Format t (CRGBA r g b a)) => ColorPixel (Format t (CRGBA r g b a)) Source # 
Eq (CRGBA a b c d) Source # 

Methods

(==) :: CRGBA a b c d -> CRGBA a b c d -> Bool #

(/=) :: CRGBA a b c d -> CRGBA a b c d -> Bool #

Ord (CRGBA a b c d) Source # 

Methods

compare :: CRGBA a b c d -> CRGBA a b c d -> Ordering #

(<) :: CRGBA a b c d -> CRGBA a b c d -> Bool #

(<=) :: CRGBA a b c d -> CRGBA a b c d -> Bool #

(>) :: CRGBA a b c d -> CRGBA a b c d -> Bool #

(>=) :: CRGBA a b c d -> CRGBA a b c d -> Bool #

max :: CRGBA a b c d -> CRGBA a b c d -> CRGBA a b c d #

min :: CRGBA a b c d -> CRGBA a b c d -> CRGBA a b c d #

Show (CRGBA a b c d) Source # 

Methods

showsPrec :: Int -> CRGBA a b c d -> ShowS #

show :: CRGBA a b c d -> String #

showList :: [CRGBA a b c d] -> ShowS #

data CDepth a Source #

A depth channel.

Constructors

CDepth 

Instances

Pixel Depth32F Source # 

Associated Types

type PixelBase Depth32F :: *

Eq (CDepth a) Source # 

Methods

(==) :: CDepth a -> CDepth a -> Bool #

(/=) :: CDepth a -> CDepth a -> Bool #

Ord (CDepth a) Source # 

Methods

compare :: CDepth a -> CDepth a -> Ordering #

(<) :: CDepth a -> CDepth a -> Bool #

(<=) :: CDepth a -> CDepth a -> Bool #

(>) :: CDepth a -> CDepth a -> Bool #

(>=) :: CDepth a -> CDepth a -> Bool #

max :: CDepth a -> CDepth a -> CDepth a #

min :: CDepth a -> CDepth a -> CDepth a #

Show (CDepth a) Source # 

Methods

showsPrec :: Int -> CDepth a -> ShowS #

show :: CDepth a -> String #

showList :: [CDepth a] -> ShowS #

Pixel (Format t (CDepth d)) => FramebufferDepthAttachment (Format t (CDepth d)) Source # 

Methods

addDepthOutput :: MonadResource m => GLuint -> Natural -> Natural -> Natural -> proxy (Format t (CDepth d)) -> m (Bool, TexturizeFormat (Format t (CDepth d)))

Pixel format

data Format t c Source #

A pixel format.

Constructors

Format 

Instances

Pixel Depth32F Source # 

Associated Types

type PixelBase Depth32F :: *

Pixel RGBA32F Source # 

Associated Types

type PixelBase RGBA32F :: *

Pixel RGB32F Source # 

Associated Types

type PixelBase RGB32F :: *

Pixel RGBA8UI Source # 

Associated Types

type PixelBase RGBA8UI :: *

Pixel RGB8UI Source # 

Associated Types

type PixelBase RGB8UI :: *

Eq (Format t c) Source # 

Methods

(==) :: Format t c -> Format t c -> Bool #

(/=) :: Format t c -> Format t c -> Bool #

Ord (Format t c) Source # 

Methods

compare :: Format t c -> Format t c -> Ordering #

(<) :: Format t c -> Format t c -> Bool #

(<=) :: Format t c -> Format t c -> Bool #

(>) :: Format t c -> Format t c -> Bool #

(>=) :: Format t c -> Format t c -> Bool #

max :: Format t c -> Format t c -> Format t c #

min :: Format t c -> Format t c -> Format t c #

Show (Format t c) Source # 

Methods

showsPrec :: Int -> Format t c -> ShowS #

show :: Format t c -> String #

showList :: [Format t c] -> ShowS #

Pixel (Format t (CRGBA r g b a)) => ColorPixel (Format t (CRGBA r g b a)) Source # 
Pixel (Format t (CRGB r g b)) => ColorPixel (Format t (CRGB r g b)) Source # 
Pixel (Format t (CRG r g)) => ColorPixel (Format t (CRG r g)) Source # 
Pixel (Format t (CR r)) => ColorPixel (Format t (CR r)) Source # 
Pixel (Format t (CDepth d)) => FramebufferDepthAttachment (Format t (CDepth d)) Source # 

Methods

addDepthOutput :: MonadResource m => GLuint -> Natural -> Natural -> Natural -> proxy (Format t (CDepth d)) -> m (Bool, TexturizeFormat (Format t (CDepth d)))

ColorPixel (Format t c) => FramebufferColorAttachment (Format t c) Source # 

Methods

addColorOutput :: MonadResource m => GLuint -> Natural -> Natural -> Natural -> Natural -> proxy (Format t c) -> m (Natural, TexturizeFormat (Format t c))

class Pixel f Source #

Minimal complete definition

pixelFormat, pixelIFormat, pixelType

Instances

Pixel Depth32F Source # 

Associated Types

type PixelBase Depth32F :: *

Pixel RGBA32F Source # 

Associated Types

type PixelBase RGBA32F :: *

Pixel RGB32F Source # 

Associated Types

type PixelBase RGB32F :: *

Pixel RGBA8UI Source # 

Associated Types

type PixelBase RGBA8UI :: *

Pixel RGB8UI Source # 

Associated Types

type PixelBase RGB8UI :: *

Color pixel

class Pixel p => ColorPixel p Source #

Instances

Pixel (Format t (CRGBA r g b a)) => ColorPixel (Format t (CRGBA r g b a)) Source # 
Pixel (Format t (CRGB r g b)) => ColorPixel (Format t (CRGB r g b)) Source # 
Pixel (Format t (CRG r g)) => ColorPixel (Format t (CRG r g)) Source # 
Pixel (Format t (CR r)) => ColorPixel (Format t (CR r)) Source #