{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE TypeFamilies #-}
module Graphics.Pixel
( Pixel(Pixel, PixelX, PixelRGB, PixelHSI, PixelHSL, PixelHSV,
PixelCMYK, PixelYCbCr, PixelXA, PixelRGBA, PixelHSIA, PixelHSLA,
PixelHSVA, PixelCMYKA, PixelYCbCrA)
, liftPixel
, pixelColor
, toPixel8
, toPixel16
, toPixel32
, toPixel64
, toPixelF
, toPixelD
, module Graphics.Color.Model
, module Graphics.Color.Algebra.Binary
) where
import Graphics.Color.Algebra.Binary
import Graphics.Color.Model
import Graphics.Pixel.Internal
pattern PixelX :: e -> Pixel X e
pattern $bPixelX :: e -> Pixel X e
$mPixelX :: forall r e. Pixel X e -> (e -> r) -> (Void# -> r) -> r
PixelX y = Pixel (ColorX y)
{-# COMPLETE PixelX #-}
pattern PixelRGB :: e -> e -> e -> Pixel RGB e
pattern $bPixelRGB :: e -> e -> e -> Pixel RGB e
$mPixelRGB :: forall r e. Pixel RGB e -> (e -> e -> e -> r) -> (Void# -> r) -> r
PixelRGB r g b = Pixel (ColorRGB r g b)
{-# COMPLETE PixelRGB #-}
pattern PixelHSI :: e -> e -> e -> Pixel HSI e
pattern $bPixelHSI :: e -> e -> e -> Pixel HSI e
$mPixelHSI :: forall r e. Pixel HSI e -> (e -> e -> e -> r) -> (Void# -> r) -> r
PixelHSI h s i = Pixel (ColorHSI h s i)
{-# COMPLETE PixelHSI #-}
pattern PixelHSL :: e -> e -> e -> Pixel HSL e
pattern $bPixelHSL :: e -> e -> e -> Pixel HSL e
$mPixelHSL :: forall r e. Pixel HSL e -> (e -> e -> e -> r) -> (Void# -> r) -> r
PixelHSL h s l = Pixel (ColorHSL h s l)
{-# COMPLETE PixelHSL #-}
pattern PixelHSV :: e -> e -> e -> Pixel HSV e
pattern $bPixelHSV :: e -> e -> e -> Pixel HSV e
$mPixelHSV :: forall r e. Pixel HSV e -> (e -> e -> e -> r) -> (Void# -> r) -> r
PixelHSV h s v = Pixel (ColorHSV h s v)
{-# COMPLETE PixelHSV #-}
pattern PixelCMYK :: e -> e -> e -> e -> Pixel CMYK e
pattern $bPixelCMYK :: e -> e -> e -> e -> Pixel CMYK e
$mPixelCMYK :: forall r e.
Pixel CMYK e -> (e -> e -> e -> e -> r) -> (Void# -> r) -> r
PixelCMYK c m y k = Pixel (ColorCMYK c m y k)
{-# COMPLETE PixelCMYK #-}
pattern PixelYCbCr :: e -> e -> e -> Pixel YCbCr e
pattern $bPixelYCbCr :: e -> e -> e -> Pixel YCbCr e
$mPixelYCbCr :: forall r e.
Pixel YCbCr e -> (e -> e -> e -> r) -> (Void# -> r) -> r
PixelYCbCr y cb cr = Pixel (ColorYCbCr y cb cr)
{-# COMPLETE PixelYCbCr #-}
pattern PixelXA :: e -> e -> Pixel (Alpha X) e
pattern $bPixelXA :: e -> e -> Pixel (Alpha X) e
$mPixelXA :: forall r e. Pixel (Alpha X) e -> (e -> e -> r) -> (Void# -> r) -> r
PixelXA y a = Pixel (Alpha (ColorX y) a)
{-# COMPLETE PixelXA #-}
pattern PixelRGBA :: e -> e -> e -> e -> Pixel (Alpha RGB) e
pattern $bPixelRGBA :: e -> e -> e -> e -> Pixel (Alpha RGB) e
$mPixelRGBA :: forall r e.
Pixel (Alpha RGB) e -> (e -> e -> e -> e -> r) -> (Void# -> r) -> r
PixelRGBA r g b a = Pixel (Alpha (ColorRGB r g b) a)
{-# COMPLETE PixelRGBA #-}
pattern PixelHSIA :: e -> e -> e -> e -> Pixel (Alpha HSI) e
pattern $bPixelHSIA :: e -> e -> e -> e -> Pixel (Alpha HSI) e
$mPixelHSIA :: forall r e.
Pixel (Alpha HSI) e -> (e -> e -> e -> e -> r) -> (Void# -> r) -> r
PixelHSIA h s i a = Pixel (Alpha (ColorHSI h s i) a)
{-# COMPLETE PixelHSIA #-}
pattern PixelHSLA :: e -> e -> e -> e -> Pixel (Alpha HSL) e
pattern $bPixelHSLA :: e -> e -> e -> e -> Pixel (Alpha HSL) e
$mPixelHSLA :: forall r e.
Pixel (Alpha HSL) e -> (e -> e -> e -> e -> r) -> (Void# -> r) -> r
PixelHSLA h s l a = Pixel (Alpha (ColorHSL h s l) a)
{-# COMPLETE PixelHSLA #-}
pattern PixelHSVA :: e -> e -> e -> e -> Pixel (Alpha HSV) e
pattern $bPixelHSVA :: e -> e -> e -> e -> Pixel (Alpha HSV) e
$mPixelHSVA :: forall r e.
Pixel (Alpha HSV) e -> (e -> e -> e -> e -> r) -> (Void# -> r) -> r
PixelHSVA h s v a = Pixel (Alpha (ColorHSV h s v) a)
{-# COMPLETE PixelHSVA #-}
pattern PixelCMYKA :: e -> e -> e -> e -> e -> Pixel (Alpha CMYK) e
pattern $bPixelCMYKA :: e -> e -> e -> e -> e -> Pixel (Alpha CMYK) e
$mPixelCMYKA :: forall r e.
Pixel (Alpha CMYK) e
-> (e -> e -> e -> e -> e -> r) -> (Void# -> r) -> r
PixelCMYKA c m y k a = Pixel (Alpha (ColorCMYK c m y k) a)
{-# COMPLETE PixelCMYKA #-}
pattern PixelYCbCrA :: e -> e -> e -> e -> Pixel (Alpha YCbCr) e
pattern $bPixelYCbCrA :: e -> e -> e -> e -> Pixel (Alpha YCbCr) e
$mPixelYCbCrA :: forall r e.
Pixel (Alpha YCbCr) e
-> (e -> e -> e -> e -> r) -> (Void# -> r) -> r
PixelYCbCrA y cb cr a = Pixel (Alpha (ColorYCbCr y cb cr) a)
{-# COMPLETE PixelYCbCrA #-}