cairo 0.13.8.2 → 0.13.10.0
raw patch · 4 files changed
+52/−7 lines, 4 filesdep ~arraydep ~bytestringdep ~mtl
Dependency ranges changed: array, bytestring, mtl, text
Files
- Graphics/Rendering/Cairo.hs +28/−2
- Graphics/Rendering/Cairo/Internal/Surfaces/SVG.chs +5/−0
- Graphics/Rendering/Cairo/Types.chs +12/−0
- cairo.cabal +7/−5
Graphics/Rendering/Cairo.hs view
@@ -250,7 +250,11 @@ #ifdef CAIRO_HAS_SVG_SURFACE -- ** SVG surfaces , withSVGSurface+#if CAIRO_CHECK_VERSION(1,16,0)+ , svgSurfaceSetDocumentUnit+ , svgSurfaceGetDocumentUnit #endif+#endif #if CAIRO_CHECK_VERSION(1,10,0) -- * Regions@@ -321,6 +325,12 @@ , Extend(..) , Filter(..) +#ifdef CAIRO_HAS_SVG_SURFACE+#if CAIRO_CHECK_VERSION(1,16,0)+ , SvgUnit(..)+#endif+#endif+ -- mesh patterns #if CAIRO_CHECK_VERSION(1,12,0) , createMeshPattern@@ -2333,8 +2343,14 @@ -- withSVGSurface :: FilePath -- ^ @filename@ - a filename for the SVG output (must be writable)- -> Double -- ^ width of the surface, in points (1 point == 1\/72.0 inch)- -> Double -- ^ height of the surface, in points (1 point == 1\/72.0 inch)+ -> Double -- ^ Width of the surface. The default unit is points (1 point == 1\/72.0 inch)+#if CAIRO_CHECK_VERSION(1,16,0)+ -- and can be changed with 'svgSurfaceSetDocumentUnit'.+#endif+ -> Double -- ^ Height of the surface. The default unit is points (1 point == 1\/72.0 inch)+#if CAIRO_CHECK_VERSION(1,16,0)+ -- and can be changed with 'svgSurfaceSetDocumentUnit'.+#endif -> (Surface -> IO a) -- ^ an action that may use the surface. The surface is -- only valid within in this action. -> IO a@@ -2345,6 +2361,16 @@ unless (status == StatusSuccess) $ Internal.statusToString status >>= fail) (\surface -> f surface)++#if CAIRO_CHECK_VERSION(1,16,0)+-- | Use the specified unit for the width and height of the generated SVG file.+svgSurfaceSetDocumentUnit :: MonadIO m => Surface -> SvgUnit -> m ()+svgSurfaceSetDocumentUnit s unit = liftIO $ Internal.svgSurfaceSetDocumentUnit s unit++-- | Get the specified unit for the width and height of the generated SVG file.+svgSurfaceGetDocumentUnit :: MonadIO m => Surface -> m SvgUnit+svgSurfaceGetDocumentUnit s = liftIO $ Internal.svgSurfaceGetDocumentUnit s+#endif #endif #if CAIRO_CHECK_VERSION(1,10,0)
Graphics/Rendering/Cairo/Internal/Surfaces/SVG.chs view
@@ -25,4 +25,9 @@ {#fun svg_surface_create as svgSurfaceCreate { withCAString* `FilePath', `Double', `Double' } -> `Surface' mkSurface*#} +#if CAIRO_CHECK_VERSION(1,16,0)+{#fun svg_surface_set_document_unit as svgSurfaceSetDocumentUnit { withSurface* `Surface', cFromEnum `SvgUnit' } -> `()'#}+{#fun svg_surface_get_document_unit as svgSurfaceGetDocumentUnit { withSurface* `Surface' } -> `SvgUnit' cToEnum#}+#endif+ #endif
Graphics/Rendering/Cairo/Types.chs view
@@ -51,6 +51,11 @@ , Filter(..) , SurfaceType(..) , PatternType(..)+#ifdef CAIRO_HAS_SVG_SURFACE+#if CAIRO_CHECK_VERSION(1,16,0)+ , SvgUnit(..)+#endif+#endif , cIntConv , cFloatConv@@ -426,6 +431,13 @@ -- | Specify how filtering is done. {#enum filter_t as Filter {underscoreToCase} deriving(Eq,Show)#}++#ifdef CAIRO_HAS_SVG_SURFACE+#if CAIRO_CHECK_VERSION(1,16,0)+-- | Specify the unit used in SVG surfaces.+{#enum svg_unit_t as SvgUnit {underscoreToCase} deriving(Eq, Show) #}+#endif+#endif -- Marshalling functions
cairo.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 Name: cairo-Version: 0.13.8.2+Version: 0.13.10.0 License: BSD-3-Clause License-file: COPYRIGHT Copyright: (c) 2001-2010 The Gtk2Hs Team, (c) Paolo Martini 2005, (c) Abraham Egnor 2003, 2004, (c) Aetion Technologies LLC 2004@@ -52,15 +52,17 @@ Description: Build the Scalable Vector Graphics (SVG) backend of Cairo. custom-setup- setup-depends: base >= 4.6,- Cabal >= 2.0 && < 3.7,+ setup-depends: base >= 4.6 && <5,+ Cabal >= 2.0 && < 3.11, gtk2hs-buildtools >= 0.13.2.0 && < 0.14 Library build-depends: base >= 4.8 && < 5, utf8-string >= 0.2 && < 1.1,- text >= 1.0.0.0 && < 1.3,- bytestring, mtl, array+ text >= 1.0.0.0 && < 2.1,+ array < 0.6,+ bytestring < 0.12,+ mtl < 2.4 exposed-modules: Graphics.Rendering.Cairo Graphics.Rendering.Cairo.Matrix Graphics.Rendering.Cairo.Types