nanovg-0.6.0.0: Haskell bindings for nanovg

Safe HaskellNone
LanguageHaskell2010

NanoVG.Internal.Color

Synopsis

Documentation

data Color Source #

rgba

Constructors

Color !CFloat !CFloat !CFloat !CFloat 
Instances
Eq Color Source # 
Instance details

Defined in NanoVG.Internal.Color

Methods

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

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

Ord Color Source # 
Instance details

Defined in NanoVG.Internal.Color

Methods

compare :: Color -> Color -> Ordering #

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

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

(>) :: Color -> Color -> Bool #

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

max :: Color -> Color -> Color #

min :: Color -> Color -> Color #

Read Color Source # 
Instance details

Defined in NanoVG.Internal.Color

Show Color Source # 
Instance details

Defined in NanoVG.Internal.Color

Methods

showsPrec :: Int -> Color -> ShowS #

show :: Color -> String #

showList :: [Color] -> ShowS #

Storable Color Source # 
Instance details

Defined in NanoVG.Internal.Color

Methods

sizeOf :: Color -> Int #

alignment :: Color -> Int #

peekElemOff :: Ptr Color -> Int -> IO Color #

pokeElemOff :: Ptr Color -> Int -> Color -> IO () #

peekByteOff :: Ptr b -> Int -> IO Color #

pokeByteOff :: Ptr b -> Int -> Color -> IO () #

peek :: Ptr Color -> IO Color #

poke :: Ptr Color -> Color -> IO () #

rgb :: CUChar -> CUChar -> CUChar -> Color Source #

Returns a color value from red, green, blue values. Alpha will be set to 255 (1.0f).

rgbf :: CFloat -> CFloat -> CFloat -> Color Source #

Returns a color value from red, green, blue values. Alpha will be set to 1.0f.

rgba :: CUChar -> CUChar -> CUChar -> CUChar -> Color Source #

Returns a color value from red, green, blue and alpha values.

rgbaf :: CFloat -> CFloat -> CFloat -> CFloat -> Color Source #

Returns a color value from red, green, blue and alpha values.

lerpRGBA :: Color -> Color -> CFloat -> Color Source #

Linearly interpolates from color c0 to c1, and returns resulting color value.

transRGBA :: Color -> CUChar -> Color Source #

Sets transparency of a color value.

transRGBAf :: Color -> CFloat -> Color Source #

Sets transparency of a color value.

hsl :: CFloat -> CFloat -> CFloat -> Color Source #

Returns color value specified by hue, saturation and lightness. HSL values are all in range [0..1], alpha will be set to 255.

hsla :: CFloat -> CFloat -> CFloat -> CUChar -> Color Source #

Returns color value specified by hue, saturation and lightness and alpha. HSL values are all in range [0..1], alpha in range [0..255]