packages feed

colour 1.1.0 → 2.0.0

raw patch · 4 files changed

+10/−10 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- Data.Colour: disolve :: (Num a) => a -> AlphaColour a -> AlphaColour a
+ Data.Colour: dissolve :: (Num a) => a -> AlphaColour a -> AlphaColour a

Files

Data/Colour.hs view
@@ -41,7 +41,7 @@  ,AffineSpace(..), blend   ,ColourOps(..)- ,disolve, atop+ ,dissolve, atop  ) where 
Data/Colour/Internal.hs view
@@ -102,12 +102,12 @@ opaque c = RGBA c Chan.full  -- |Returns an 'AlphaColour' more transparent by a factor of @o@.-disolve :: (Num a) => a -> AlphaColour a -> AlphaColour a-disolve o (RGBA c a) = RGBA (darken o c) (Chan.scale o a)+dissolve :: (Num a) => a -> AlphaColour a -> AlphaColour a+dissolve o (RGBA c a) = RGBA (darken o c) (Chan.scale o a)  -- |Creates an 'AlphaColour' from a 'Colour' with a given opacity. ----- >c `withOpacity` o == disolve o (opaque c) +-- >c `withOpacity` o == dissolve o (opaque c)  withOpacity :: (Num a) => Colour a -> a -> AlphaColour a c `withOpacity` o = RGBA (darken o c) (Chan o) @@ -144,7 +144,7 @@  instance AffineSpace AlphaColour where  affineCombo l z =-   foldl1' rgbaAdd [disolve w a | (w,a) <- (1-total,z):l]+   foldl1' rgbaAdd [dissolve w a | (w,a) <- (1-total,z):l]   where    total = sum $ map fst l 
Tests.hs view
@@ -188,10 +188,10 @@ -}  prop_disolveId :: RAlphaColour -> Bool-prop_disolveId c = disolve 1 c == c+prop_disolveId c = dissolve 1 c == c  prop_disolveTransparent :: RAlphaColour -> Bool-prop_disolveTransparent c = disolve 0 c == transparent+prop_disolveTransparent c = dissolve 0 c == transparent  prop_transparentOver :: RColour -> Bool prop_transparentOver c = transparent `over` c == c@@ -274,8 +274,8 @@         ,("sRGB-from-to", test prop_fromToSRGB) --        ,("Y'CbCr-709-from-to", test prop_fromToY'CbCr709) --        ,("Y'CbCr-601-from-to", test prop_fromToY'CbCr601)-        ,("disolve-id", test prop_disolveId)-        ,("disolve-transparent", test prop_disolveTransparent)+        ,("dissolve-id", test prop_disolveId)+        ,("dissolve-transparent", test prop_disolveTransparent)         ,("transparent-over", test prop_transparentOver)         ,("over-transparent", test prop_overTransparent)         ,("opaque-over", test prop_opaqueOver)
colour.cabal view
@@ -1,5 +1,5 @@ Name:                colour-Version:             1.1.0+Version:             2.0.0 Cabal-Version:       >= 1.2 License:             OtherLicense License-file:        LICENSE