/usr/share/doc/libghc-gtk3-doc/html/Graphics-UI-Gtk-Cairo.html is in libghc-gtk3-doc 0.14.8-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Graphics.UI.Gtk.Cairo</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="file:///usr/share/javascript/mathjax/MathJax.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Graphics-UI-Gtk-Cairo.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Graphics-UI-Gtk-Cairo.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">gtk3-0.14.8: Binding to the Gtk+ 3 graphical user interface library</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Maintainer</th><td>gtk2hs-users@lists.sourceforge.net</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Portability</th><td>portable (depends on GHC)</td></tr><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">Graphics.UI.Gtk.Cairo</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Global Cairo settings.</a></li><li><a href="#g:2">Functions for the <code>Render</code> monad.</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Gtk specific functions to for rendering with Cairo.</p><p>Cairo is a graphics library that supports vector graphics and image
compositing that can be used with Gdk.
The Cairo API is an addition to Gdk/Gtk (rather than a replacement).
Cairo rendering can be performed on any <code><a href="Graphics-UI-Gtk-Gdk.html#v:Drawable">Drawable</a></code>
by calling <code>renderWithDrawable</code>. The functions in this module provide
ways of drawing Gtk specific elements, such as <code><a href="Graphics-UI-Gtk-Gdk-Pixbuf.html#t:Pixbuf">Pixbuf</a></code>s or text
laid out with Pango.</p><p>All functions in this module are only available in Gtk 2.8 or higher.</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:cairoFontMapGetDefault">cairoFontMapGetDefault</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Font.html#t:FontMap">FontMap</a></li><li class="src short"><a href="#v:cairoFontMapSetResolution">cairoFontMapSetResolution</a> :: <a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Font.html#t:FontMap">FontMap</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:cairoFontMapGetResolution">cairoFontMapGetResolution</a> :: <a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Font.html#t:FontMap">FontMap</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></li><li class="src short"><a href="#v:cairoCreateContext">cairoCreateContext</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Font.html#t:FontMap">FontMap</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Context.html#t:PangoContext">PangoContext</a></li><li class="src short"><a href="#v:cairoContextSetResolution">cairoContextSetResolution</a> :: <a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Context.html#t:PangoContext">PangoContext</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:cairoContextGetResolution">cairoContextGetResolution</a> :: <a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Context.html#t:PangoContext">PangoContext</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></li><li class="src short"><a href="#v:cairoContextSetFontOptions">cairoContextSetFontOptions</a> :: <a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Context.html#t:PangoContext">PangoContext</a> -> <a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:FontOptions">FontOptions</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:cairoContextGetFontOptions">cairoContextGetFontOptions</a> :: <a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Context.html#t:PangoContext">PangoContext</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:FontOptions">FontOptions</a></li><li class="src short"><a href="#v:getClipRectangle">getClipRectangle</a> :: <a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Graphics-UI-Gtk-Gdk-Events.html#t:Rectangle">Rectangle</a>)</li><li class="src short"><a href="#v:renderWithDrawWindow">renderWithDrawWindow</a> :: <a href="Graphics-UI-Gtk-Gdk-DrawWindow.html#t:DrawWindowClass">DrawWindowClass</a> drawWindow => drawWindow -> <a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:region">region</a> :: <a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Region">Region</a> -> <a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a> ()</li><li class="src short"><a href="#v:setSourceColor">setSourceColor</a> :: <a href="Graphics-UI-Gtk-Abstract-Widget.html#t:Color">Color</a> -> <a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a> ()</li><li class="src short"><a href="#v:setSourcePixbuf">setSourcePixbuf</a> :: <a href="Graphics-UI-Gtk-Gdk-Pixbuf.html#t:Pixbuf">Pixbuf</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a> -> <a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a> ()</li><li class="src short"><a href="#v:rectangle">rectangle</a> :: <a href="Graphics-UI-Gtk-Gdk-Events.html#t:Rectangle">Rectangle</a> -> <a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a> ()</li><li class="src short"><a href="#v:updateContext">updateContext</a> :: <a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Context.html#t:PangoContext">PangoContext</a> -> <a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a> ()</li><li class="src short"><a href="#v:createLayout">createLayout</a> :: <a href="file:///usr/share/doc/libghc-glib-doc/html/System-Glib-UTFString.html#t:GlibString">GlibString</a> string => string -> <a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a> <a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Layout.html#t:PangoLayout">PangoLayout</a></li><li class="src short"><a href="#v:updateLayout">updateLayout</a> :: <a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Layout.html#t:PangoLayout">PangoLayout</a> -> <a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a> ()</li><li class="src short"><a href="#v:showGlyphString">showGlyphString</a> :: <a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Rendering.html#t:GlyphItem">GlyphItem</a> -> <a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a> ()</li><li class="src short"><a href="#v:showLayoutLine">showLayoutLine</a> :: <a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Layout.html#t:LayoutLine">LayoutLine</a> -> <a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a> ()</li><li class="src short"><a href="#v:showLayout">showLayout</a> :: <a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Layout.html#t:PangoLayout">PangoLayout</a> -> <a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a> ()</li><li class="src short"><a href="#v:glyphStringPath">glyphStringPath</a> :: <a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Rendering.html#t:GlyphItem">GlyphItem</a> -> <a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a> ()</li><li class="src short"><a href="#v:layoutLinePath">layoutLinePath</a> :: <a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Layout.html#t:LayoutLine">LayoutLine</a> -> <a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a> ()</li><li class="src short"><a href="#v:layoutPath">layoutPath</a> :: <a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Layout.html#t:PangoLayout">PangoLayout</a> -> <a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a> ()</li></ul></div><div id="interface"><h1 id="g:1">Global Cairo settings.</h1><div class="top"><p class="src"><a id="v:cairoFontMapGetDefault" class="def">cairoFontMapGetDefault</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Font.html#t:FontMap">FontMap</a> <a href="#v:cairoFontMapGetDefault" class="selflink">#</a></p><div class="doc"><p>Retrieve the default <code><a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango.html#v:FontMap">FontMap</a></code> that contains a
list of available fonts.</p><ul><li>One purpose of creating an explicit
<code><a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Font.html#v:FontMap">FontMap</a></code> is to set
a different scaling factor between font sizes (in points, pt) and
Cairo units (in pixels). The default is 96dpi (dots per inch) which
corresponds to an average screen as output medium. A 10pt font will
therefore scale to
<code>10pt * (1/72 pt/inch) * (96 pixel/inch) = 13.3 pixel</code>.</li></ul></div></div><div class="top"><p class="src"><a id="v:cairoFontMapSetResolution" class="def">cairoFontMapSetResolution</a> :: <a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Font.html#t:FontMap">FontMap</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="#v:cairoFontMapSetResolution" class="selflink">#</a></p><div class="doc"><p>Set the scaling factor between font size and Cairo units.</p><ul><li>Value is in dots per inch (dpi). See <code><a href="Graphics-UI-Gtk-Cairo.html#v:cairoFontMapGetDefault">cairoFontMapGetDefault</a></code>.</li></ul></div></div><div class="top"><p class="src"><a id="v:cairoFontMapGetResolution" class="def">cairoFontMapGetResolution</a> :: <a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Font.html#t:FontMap">FontMap</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a> <a href="#v:cairoFontMapGetResolution" class="selflink">#</a></p><div class="doc"><p>Ask for the scaling factor between font size and Cairo units.</p><ul><li>Value is in dots per inch (dpi). See <code><a href="Graphics-UI-Gtk-Cairo.html#v:cairoFontMapGetDefault">cairoFontMapGetDefault</a></code>.</li></ul></div></div><div class="top"><p class="src"><a id="v:cairoCreateContext" class="def">cairoCreateContext</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Font.html#t:FontMap">FontMap</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Context.html#t:PangoContext">PangoContext</a> <a href="#v:cairoCreateContext" class="selflink">#</a></p><div class="doc"><p>Create a <code><a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Context.html#t:PangoContext">PangoContext</a></code>.</p><ul><li>If no <code><a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Font.html#t:FontMap">FontMap</a></code> is specified, it uses the default <code><a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Font.html#t:FontMap">FontMap</a></code> that
has a scaling factor of 96 dpi. See <code><a href="Graphics-UI-Gtk-Cairo.html#v:cairoFontMapGetDefault">cairoFontMapGetDefault</a></code>.</li></ul></div></div><div class="top"><p class="src"><a id="v:cairoContextSetResolution" class="def">cairoContextSetResolution</a> :: <a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Context.html#t:PangoContext">PangoContext</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="#v:cairoContextSetResolution" class="selflink">#</a></p><div class="doc"><p>Set the scaling factor of the <code><a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Context.html#t:PangoContext">PangoContext</a></code>.</p><ul><li>Supplying zero or a negative value will result in the resolution value
of the underlying <code><a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Font.html#t:FontMap">FontMap</a></code> to be used. See also <code><a href="Graphics-UI-Gtk-Cairo.html#v:cairoFontMapGetDefault">cairoFontMapGetDefault</a></code>.</li></ul></div></div><div class="top"><p class="src"><a id="v:cairoContextGetResolution" class="def">cairoContextGetResolution</a> :: <a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Context.html#t:PangoContext">PangoContext</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a> <a href="#v:cairoContextGetResolution" class="selflink">#</a></p><div class="doc"><p>Ask for the scaling factor of the <code><a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Context.html#t:PangoContext">PangoContext</a></code>.</p><ul><li>A negative value will be returned if no resolution has been set.
See <code><a href="Graphics-UI-Gtk-Cairo.html#v:cairoContextSetResolution">cairoContextSetResolution</a></code>.</li></ul></div></div><div class="top"><p class="src"><a id="v:cairoContextSetFontOptions" class="def">cairoContextSetFontOptions</a> :: <a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Context.html#t:PangoContext">PangoContext</a> -> <a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:FontOptions">FontOptions</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="#v:cairoContextSetFontOptions" class="selflink">#</a></p><div class="doc"><p>Set Cairo font options.</p><ul><li>Apply the given font options to the context. Values set through this
functions override those that are set by <code><a href="Graphics-UI-Gtk-Cairo.html#v:updateContext">updateContext</a></code>.</li></ul></div></div><div class="top"><p class="src"><a id="v:cairoContextGetFontOptions" class="def">cairoContextGetFontOptions</a> :: <a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Context.html#t:PangoContext">PangoContext</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:FontOptions">FontOptions</a> <a href="#v:cairoContextGetFontOptions" class="selflink">#</a></p><div class="doc"><p>Retrieve Cairo font options.</p></div></div><h1 id="g:2">Functions for the <code><a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a></code> monad.</h1><div class="top"><p class="src"><a id="v:getClipRectangle" class="def">getClipRectangle</a> :: <a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Graphics-UI-Gtk-Gdk-Events.html#t:Rectangle">Rectangle</a>) <a href="src/Graphics-UI-Gtk-Cairo.html#getClipRectangle" class="link">Source</a> <a href="#v:getClipRectangle" class="selflink">#</a></p><div class="doc"><p>Compute a bounding box in user coordinates covering the area inside
the current clip. It rounds the bounding box to integer coordinates.
Returns <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#v:Nothing">Nothing</a></code> indicating if a clip area doesn't exist.</p></div></div><div class="top"><p class="src"><a id="v:renderWithDrawWindow" class="def">renderWithDrawWindow</a> <a href="src/Graphics-UI-Gtk-Cairo.html#renderWithDrawWindow" class="link">Source</a> <a href="#v:renderWithDrawWindow" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Graphics-UI-Gtk-Gdk-DrawWindow.html#t:DrawWindowClass">DrawWindowClass</a> drawWindow</td><td class="doc empty"> </td></tr><tr><td class="src">=> drawWindow</td><td class="doc"><p><code>drawWindow</code> - a <code><a href="Graphics-UI-Gtk-Gdk-DrawWindow.html#t:DrawWindow">DrawWindow</a></code></p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a> a</td><td class="doc"><p>A newly created Cairo context.</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> a</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Creates a Cairo context for drawing to a <code><a href="Graphics-UI-Gtk-Gdk-DrawWindow.html#t:DrawWindow">DrawWindow</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:region" class="def">region</a> :: <a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Region">Region</a> -> <a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a> () <a href="src/Graphics-UI-Gtk-Cairo.html#region" class="link">Source</a> <a href="#v:region" class="selflink">#</a></p><div class="doc"><p>Adds the given region to the current path of the <code><a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a></code> context.</p></div></div><div class="top"><p class="src"><a id="v:setSourceColor" class="def">setSourceColor</a> :: <a href="Graphics-UI-Gtk-Abstract-Widget.html#t:Color">Color</a> -> <a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a> () <a href="#v:setSourceColor" class="selflink">#</a></p><div class="doc"><p>Sets the specified <code><a href="Graphics-UI-Gtk-Abstract-Widget.html#t:Color">Color</a></code> as the source color of the <code><a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a></code> context.</p></div></div><div class="top"><p class="src"><a id="v:setSourcePixbuf" class="def">setSourcePixbuf</a> <a href="src/Graphics-UI-Gtk-Cairo.html#setSourcePixbuf" class="link">Source</a> <a href="#v:setSourcePixbuf" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Graphics-UI-Gtk-Gdk-Pixbuf.html#t:Pixbuf">Pixbuf</a></td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></td><td class="doc"><p>x</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></td><td class="doc"><p>y</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a> ()</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Sets the given pixbuf as the source pattern for the Cairo context. The
pattern has an extend mode of <code><a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#v:ExtendNone">ExtendNone</a></code> and is aligned so that the
origin of pixbuf is <code>(x, y)</code>.</p></div></div><div class="top"><p class="src"><a id="v:rectangle" class="def">rectangle</a> :: <a href="Graphics-UI-Gtk-Gdk-Events.html#t:Rectangle">Rectangle</a> -> <a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a> () <a href="src/Graphics-UI-Gtk-Cairo.html#rectangle" class="link">Source</a> <a href="#v:rectangle" class="selflink">#</a></p><div class="doc"><p>Adds the given region to the current path of the <code><a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a></code> context.</p></div></div><div class="top"><p class="src"><a id="v:updateContext" class="def">updateContext</a> :: <a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Context.html#t:PangoContext">PangoContext</a> -> <a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a> () <a href="#v:updateContext" class="selflink">#</a></p><div class="doc"><p>Update a <code><a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Context.html#t:PangoContext">PangoContext</a></code> with respect to changes in a <code><a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a></code>
environment.</p><ul><li>The <code><a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Context.html#t:PangoContext">PangoContext</a></code> must have been created with
<code><a href="Graphics-UI-Gtk-Cairo.html#v:cairoCreateContext">cairoCreateContext</a></code>. Any <code><a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Layout.html#t:PangoLayout">PangoLayout</a></code>s that have been
previously created with this context have to be update using
<code><a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Layout.html#v:layoutContextChanged">layoutContextChanged</a></code>.</li></ul></div></div><div class="top"><p class="src"><a id="v:createLayout" class="def">createLayout</a> :: <a href="file:///usr/share/doc/libghc-glib-doc/html/System-Glib-UTFString.html#t:GlibString">GlibString</a> string => string -> <a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a> <a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Layout.html#t:PangoLayout">PangoLayout</a> <a href="#v:createLayout" class="selflink">#</a></p><div class="doc"><p>Create a <code><a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Layout.html#t:PangoLayout">PangoLayout</a></code> within a <code><a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a></code> context.</p><ul><li>This is a convenience function that creates a new <code><a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Context.html#t:PangoContext">PangoContext</a></code>
within this <code><a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a></code> context and creates a new <code><a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Layout.html#t:PangoLayout">PangoLayout</a></code>.
If the transformation or target surface of the <code><a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a></code> context
change, <code><a href="Graphics-UI-Gtk-Cairo.html#v:updateLayout">updateLayout</a></code> has to be called on this layout.</li></ul></div></div><div class="top"><p class="src"><a id="v:updateLayout" class="def">updateLayout</a> :: <a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Layout.html#t:PangoLayout">PangoLayout</a> -> <a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a> () <a href="#v:updateLayout" class="selflink">#</a></p><div class="doc"><p>Propagate changed to the <code><a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a></code> context to a <code><a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Layout.html#t:PangoLayout">PangoLayout</a></code>.</p><ul><li>This is a convenience function that calls <code><a href="Graphics-UI-Gtk-Cairo.html#v:updateContext">updateContext</a></code> on the
(private) <code><a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Context.html#t:PangoContext">PangoContext</a></code> of the given layout to propagate changes
from the <code><a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a></code> context to the <code><a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Context.html#t:PangoContext">PangoContext</a></code> and then calls
<code><a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Layout.html#v:layoutContextChanged">layoutContextChanged</a></code> on the layout.
This function is necessary for
<code><a href="Graphics-UI-Gtk-Cairo.html#v:createLayout">createLayout</a></code> since a private <code><a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Context.html#t:PangoContext">PangoContext</a></code> is created that is
not visible to the user.</li></ul></div></div><div class="top"><p class="src"><a id="v:showGlyphString" class="def">showGlyphString</a> :: <a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Rendering.html#t:GlyphItem">GlyphItem</a> -> <a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a> () <a href="#v:showGlyphString" class="selflink">#</a></p><div class="doc"><p>Draw a glyph string.</p><ul><li>The origin of the glyphs (the left edge of the baseline) will be drawn
at the current point of the cairo context.</li></ul></div></div><div class="top"><p class="src"><a id="v:showLayoutLine" class="def">showLayoutLine</a> :: <a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Layout.html#t:LayoutLine">LayoutLine</a> -> <a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a> () <a href="#v:showLayoutLine" class="selflink">#</a></p><div class="doc"><p>Draw a <code><a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Layout.html#t:LayoutLine">LayoutLine</a></code>.</p><ul><li>The origin of the glyphs (the left edge of the baseline) will be drawn
at the current point of the cairo context.</li></ul></div></div><div class="top"><p class="src"><a id="v:showLayout" class="def">showLayout</a> :: <a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Layout.html#t:PangoLayout">PangoLayout</a> -> <a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a> () <a href="#v:showLayout" class="selflink">#</a></p><div class="doc"><p>Draw a <code><a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Layout.html#t:PangoLayout">PangoLayout</a></code>.</p><ul><li>The top-left corner of the <code><a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Layout.html#t:PangoLayout">PangoLayout</a></code> will be drawn at the current
point of the cairo context.</li></ul></div></div><div class="top"><p class="src"><a id="v:glyphStringPath" class="def">glyphStringPath</a> :: <a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Rendering.html#t:GlyphItem">GlyphItem</a> -> <a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a> () <a href="#v:glyphStringPath" class="selflink">#</a></p><div class="doc"><p>Add the extent of a glyph string to the current path.</p><ul><li>The origin of the glyphs (the left edge of the line) will be at the
current point of the cairo context.</li></ul></div></div><div class="top"><p class="src"><a id="v:layoutLinePath" class="def">layoutLinePath</a> :: <a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Layout.html#t:LayoutLine">LayoutLine</a> -> <a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a> () <a href="#v:layoutLinePath" class="selflink">#</a></p><div class="doc"><p>Add the extent of a layout line to the current path.</p><ul><li>The origin of the glyphs (the left edge of the line) will be at the
current point of the cairo context.</li></ul></div></div><div class="top"><p class="src"><a id="v:layoutPath" class="def">layoutPath</a> :: <a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Layout.html#t:PangoLayout">PangoLayout</a> -> <a href="file:///usr/share/doc/libghc-cairo-doc/html/Graphics-Rendering-Cairo.html#t:Render">Render</a> () <a href="#v:layoutPath" class="selflink">#</a></p><div class="doc"><p>Add the layout to the current path.</p><ul><li>Adds the top-left corner of the text to the current path. Afterwards,
the path position is at the bottom-right corner of the <code><a href="file:///usr/share/doc/libghc-pango-doc/html/Graphics-Rendering-Pango-Layout.html#t:PangoLayout">PangoLayout</a></code>.</li></ul></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>
|