Chart-diagrams 1.5.4 → 1.6
raw patch · 2 files changed
+11/−14 lines, 2 filesdep ~ChartPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: Chart
API changes (from Hackage documentation)
- Graphics.Rendering.Chart.Backend.Diagrams: type DFont n = PreparedFont n
- Graphics.Rendering.Chart.Backend.Diagrams: DEnv :: AlignmentFns -> FontStyle -> (FontStyle -> PreparedFont n) -> (n, n) -> Map (String, FontSlant, FontWeight) (Set String) -> DEnv n
+ Graphics.Rendering.Chart.Backend.Diagrams: DEnv :: AlignmentFns -> FontStyle -> FontSelector n -> (n, n) -> Map (String, FontSlant, FontWeight) (Set String) -> DEnv n
- Graphics.Rendering.Chart.Backend.Diagrams: [envSelectFont] :: DEnv n -> FontStyle -> PreparedFont n
+ Graphics.Rendering.Chart.Backend.Diagrams: [envSelectFont] :: DEnv n -> FontSelector n
- Graphics.Rendering.Chart.Backend.Diagrams: type FontSelector n = FontStyle -> DFont n
+ Graphics.Rendering.Chart.Backend.Diagrams: type FontSelector n = FontStyle -> PreparedFont n
Files
Chart-diagrams.cabal view
@@ -1,5 +1,5 @@ Name: Chart-diagrams-Version: 1.5.4+Version: 1.6 License: BSD3 License-file: LICENSE Copyright: Jan Bracker, 2006-2014@@ -35,13 +35,13 @@ , SVGFonts >= 1.4 && < 1.6 , colour >= 2.2.1 && < 2.4 , blaze-markup >= 0.7 && < 0.8- , lucid-svg >= 0.4 && < 0.6+ , lucid-svg >= 0.4 && < 0.7 , bytestring >= 0.9 && < 1.0 , operational >= 0.2.2 && < 0.3 , containers >= 0.4 && < 0.6 , data-default-class < 0.1 , lens >= 3.9 && < 4.14- , Chart >= 1.5 && < 1.6+ , Chart >= 1.6 && < 1.7 , text other-modules: Paths_Chart_diagrams Exposed-modules:
Graphics/Rendering/Chart/Backend/Diagrams.hs view
@@ -9,7 +9,7 @@ , runBackendR , defaultEnv , createEnv- , DEnv(..), DFont+ , DEnv(..) -- * File Output Functons , FileFormat(..)@@ -241,20 +241,17 @@ -- | The diagrams backend environement. data DEnv n = DEnv- { envAlignmentFns :: AlignmentFns -- ^ The used alignment functions.- , envFontStyle :: FontStyle -- ^ The current/initial font style.- , envSelectFont :: FontStyle -> F.PreparedFont n -- ^ The font selection function.- , envOutputSize :: (n,n) -- ^ The size of the rendered output.+ { envAlignmentFns :: AlignmentFns -- ^ The used alignment functions.+ , envFontStyle :: FontStyle -- ^ The current/initial font style.+ , envSelectFont :: FontSelector n -- ^ The font selection function.+ , envOutputSize :: (n,n) -- ^ The size of the rendered output. , envUsedGlyphs :: M.Map (String, FontSlant, FontWeight) (S.Set String) -- ^ The map of all glyphs that are used from a specific font. } type DState n a = State (DEnv n) a -type DFont n = F.PreparedFont n--type FontSelector n = FontStyle -> DFont n-+type FontSelector n = FontStyle -> F.PreparedFont n -- | Load sans-serif fonts only @@ -333,10 +330,10 @@ return selectFont -alterFontFamily :: String -> DFont n -> DFont n+alterFontFamily :: String -> F.PreparedFont n -> F.PreparedFont n alterFontFamily n (fd, om) = (fd { F.fontDataFamily = n }, om) -isFontFamily :: String -> DFont n -> Bool+isFontFamily :: String -> F.PreparedFont n -> Bool isFontFamily n (fd, _) = n == F.fontDataFamily fd -- | Produce an environment with a custom set of fonts.