<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">

<!-- THIS FILE IS GENERATED DO NOT EDIT -->


<erlref>
<header>
  <copyright>
    <year>2020</year><year>2021</year>
    <holder>wxWidgets team.</holder></copyright>
  <legalnotice>Licensed under the wxWindows Free Documentation Licence, Version 3
  </legalnotice>
  <title>wxDC</title>
</header>
<module>wxDC</module>
<modulesummary>Functions for wxDC class</modulesummary>
<description><p>A <seeerl marker="wxDC"><c>wxDC</c></seeerl> is a <c>"device context"</c> onto which graphics and text can be drawn. It is intended to represent different output devices and offers a common abstract API for drawing on any of them.
      </p><p>wxWidgets offers an alternative drawing API based on the modern drawing backends GDI+, CoreGraphics, Cairo and Direct2D. See <seeerl marker="wxGraphicsContext"><c>wxGraphicsContext</c></seeerl>, <seeerl marker="wxGraphicsRenderer"><c>wxGraphicsRenderer</c></seeerl> and related classes. There is also a <seeerl marker="wxGCDC"><c>wxGCDC</c></seeerl> linking the APIs by offering the <seeerl marker="wxDC"><c>wxDC</c></seeerl> API on top of a <seeerl marker="wxGraphicsContext"><c>wxGraphicsContext</c></seeerl>.
      </p><p><seeerl marker="wxDC"><c>wxDC</c></seeerl> is an abstract base class and cannot be created directly. Use <seeerl marker="wxPaintDC"><c>wxPaintDC</c></seeerl>, <seeerl marker="wxClientDC"><c>wxClientDC</c></seeerl>, <seeerl marker="wxWindowDC"><c>wxWindowDC</c></seeerl>, <seeerl marker="wxScreenDC"><c>wxScreenDC</c></seeerl>, <seeerl marker="wxMemoryDC"><c>wxMemoryDC</c></seeerl> or <c>wxPrinterDC</c> (not implemented in wx). Notice that device contexts which are associated with windows (i.e. <seeerl marker="wxClientDC"><c>wxClientDC</c></seeerl>, <seeerl marker="wxWindowDC"><c>wxWindowDC</c></seeerl> and <seeerl marker="wxPaintDC"><c>wxPaintDC</c></seeerl>) use the window font and colours by default (starting with wxWidgets 2.9.0) but the other device context classes use system-default values so you always must set the appropriate fonts and colours before using them.
      </p><p>In addition to the versions of the methods documented below, there are also versions which accept single {X,Y} parameter instead of the two wxCoord ones or {X,Y} and {Width,Height} instead of the four wxCoord parameters.
      </p><p>Beginning with wxWidgets 2.9.0 the entire <seeerl marker="wxDC"><c>wxDC</c></seeerl> code has been reorganized. All platform dependent code (actually all drawing code) has been moved into backend classes which derive from a common wxDCImpl class. The user-visible classes such as <seeerl marker="wxClientDC"><c>wxClientDC</c></seeerl> and <seeerl marker="wxPaintDC"><c>wxPaintDC</c></seeerl> merely forward all calls to the backend implementation.
      </p><p>Device and logical units</p> <p>In the <seeerl marker="wxDC"><c>wxDC</c></seeerl> context there is a distinction between <c>logical</c> units and <c>device</c> units.
      </p> <p><c>Device</c> units are the units native to the particular device; e.g. for a screen, a device unit is a <c>pixel</c>. For a printer, the device unit is defined by the resolution of the printer (usually given in <c>DPI:</c> dot-per-inch).
      </p> <p>All <seeerl marker="wxDC"><c>wxDC</c></seeerl> functions use instead <c>logical</c> units, unless where explicitly stated. Logical units are arbitrary units mapped to device units using the current mapping mode (see <seemfa marker="#setMapMode/2"><c>setMapMode/2</c></seemfa>).
      </p> <p>This mechanism allows reusing the same code which prints on e.g. a window on the screen to print on e.g. a paper.
      </p><p>Support for Transparency / Alpha Channel</p> <p>In general <seeerl marker="wxDC"><c>wxDC</c></seeerl> methods don't support alpha transparency and the alpha component of <seetype marker="wx#wx_colour"><c>wx_color()</c></seetype> is simply ignored and you need to use <seeerl marker="wxGraphicsContext"><c>wxGraphicsContext</c></seeerl> for full transparency support. There are, however, a few exceptions: first, under macOS and GTK+ 3 colours with alpha channel are supported in all the normal wxDC-derived classes as they use <seeerl marker="wxGraphicsContext"><c>wxGraphicsContext</c></seeerl> internally. Second, under all platforms <c>wxSVGFileDC</c> (not implemented in wx) also fully supports alpha channel. In both of these cases the instances of <seeerl marker="wxPen"><c>wxPen</c></seeerl> or <seeerl marker="wxBrush"><c>wxBrush</c></seeerl> that are built from <seetype marker="wx#wx_colour"><c>wx_color()</c></seetype> use the colour's alpha values when stroking or filling.
      </p><p>Support for Transformation Matrix</p> <p>On some platforms (currently under MSW, GTK+ 3, macOS) <seeerl marker="wxDC"><c>wxDC</c></seeerl> has support for applying an arbitrary affine transformation matrix to its coordinate system (since 3.1.1 this feature is also supported by <seeerl marker="wxGCDC"><c>wxGCDC</c></seeerl> in all ports). Call <c>CanUseTransformMatrix()</c> (not implemented in wx) to check if this support is available and then call <c>SetTransformMatrix()</c> (not implemented in wx) if it is. If the transformation matrix is not supported, <c>SetTransformMatrix()</c> (not implemented in wx) always simply returns <c>false</c> and doesn't do anything.
      </p> <p>This feature is only available when <c>wxUSE_DC_TRANSFORM_MATRIX</c> build option is enabled.
      </p>  <p>See: <url href="https://docs.wxwidgets.org/3.1/overview_dc.html#overview_dc">Overview dc</url>, <seeerl marker="wxGraphicsContext"><c>wxGraphicsContext</c></seeerl>, <c>wxDCFontChanger</c> (not implemented in wx), <c>wxDCTextColourChanger</c> (not implemented in wx), <c>wxDCPenChanger</c> (not implemented in wx), <c>wxDCBrushChanger</c> (not implemented in wx), <c>wxDCClipper</c> (not implemented in wx)
      </p>
  <p>wxWidgets docs: <url href="https://docs.wxwidgets.org/3.1/classwx_d_c.html">wxDC</url></p>
  </description>
<datatypes><datatype><name name="wxDC"/></datatype></datatypes>

<funcs>
  <func>
    <name name="blit" arity="5" clause_i="1" since=""/>
    <fsummary>See: <c>blit/6</c></fsummary>
  </func>
  
  <func>
    <name name="blit" arity="6" clause_i="1" since=""/>
    <fsummary>Copy from a source DC to this DC. </fsummary>
    <desc><p>Copy from a source DC to this DC. 
      </p><p>With this method you can specify the destination coordinates and the size of area to copy which will be the same for both the source and target DCs. If you need to apply scaling while copying, use <c>StretchBlit()</c> (not implemented in wx).
      </p><p>Notice that source DC coordinates <c>xsrc</c> and <c>ysrc</c> are interpreted using the current source DC coordinate system, i.e. the scale, origin position and axis directions are taken into account when transforming them to physical (pixel) coordinates.
      </p><p>Remark: There is partial support for <seemfa marker="#blit/6"><c>blit/6</c></seemfa> in <seeerl marker="wxPostScriptDC"><c>wxPostScriptDC</c></seeerl>, under X.
      </p><p>See: <c>StretchBlit()</c> (not implemented in wx), <seeerl marker="wxMemoryDC"><c>wxMemoryDC</c></seeerl>, <seeerl marker="wxBitmap"><c>wxBitmap</c></seeerl>, <seeerl marker="wxMask"><c>wxMask</c></seeerl>
      </p></desc>
  </func>
  
  <func>
    <name name="calcBoundingBox" arity="3" clause_i="1" since=""/>
    <fsummary>Adds the specified point to the bounding box which can be retrieved with <c>minX/1</c>, <c>maxX/1</c> and <c>minY/1</c>, <c>maxY/1</c> functions. </fsummary>
    <desc><p>Adds the specified point to the bounding box which can be retrieved with <seemfa marker="#minX/1"><c>minX/1</c></seemfa>, <seemfa marker="#maxX/1"><c>maxX/1</c></seemfa> and <seemfa marker="#minY/1"><c>minY/1</c></seemfa>, <seemfa marker="#maxY/1"><c>maxY/1</c></seemfa> functions. 
      </p><p>See: <seemfa marker="#resetBoundingBox/1"><c>resetBoundingBox/1</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="clear" arity="1" clause_i="1" since=""/>
    <fsummary>Clears the device context using the current background brush. </fsummary>
    <desc><p>Clears the device context using the current background brush. 
      </p><p>Note that <seemfa marker="#setBackground/2"><c>setBackground/2</c></seemfa> method must be used to set the brush used by <seemfa marker="#clear/1"><c>clear/1</c></seemfa>, the brush used for filling the shapes set by <seemfa marker="#setBrush/2"><c>setBrush/2</c></seemfa> is ignored by it.
      </p><p>If no background brush was set, solid white brush is used to clear the device context. 
      </p></desc>
  </func>
  
  <func>
    <name name="crossHair" arity="2" clause_i="1" since=""/>
    <fsummary>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </fsummary>
    <desc><p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
      </p></desc>
  </func>
  
  <func>
    <name name="destroyClippingRegion" arity="1" clause_i="1" since=""/>
    <fsummary>Destroys the current clipping region so that none of the DC is clipped. </fsummary>
    <desc><p>Destroys the current clipping region so that none of the DC is clipped. 
      </p><p>See: <seemfa marker="#setClippingRegion/3"><c>setClippingRegion/3</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="deviceToLogicalX" arity="2" clause_i="1" since=""/>
    <fsummary>Convert <c>device</c> X coordinate to logical coordinate, using the current mapping mode, user scale factor, device origin and axis orientation. </fsummary>
    <desc><p>Convert <c>device</c> X coordinate to logical coordinate, using the current mapping mode, user scale factor, device origin and axis orientation. 
      </p></desc>
  </func>
  
  <func>
    <name name="deviceToLogicalXRel" arity="2" clause_i="1" since=""/>
    <fsummary>Convert <c>device</c> X coordinate to relative logical coordinate, using the current mapping mode and user scale factor but ignoring the axis orientation. </fsummary>
    <desc><p>Convert <c>device</c> X coordinate to relative logical coordinate, using the current mapping mode and user scale factor but ignoring the axis orientation. 
      </p><p>Use this for converting a width, for example. 
      </p></desc>
  </func>
  
  <func>
    <name name="deviceToLogicalY" arity="2" clause_i="1" since=""/>
    <fsummary>Converts <c>device</c> Y coordinate to logical coordinate, using the current mapping mode, user scale factor, device origin and axis orientation. </fsummary>
    <desc><p>Converts <c>device</c> Y coordinate to logical coordinate, using the current mapping mode, user scale factor, device origin and axis orientation. 
      </p></desc>
  </func>
  
  <func>
    <name name="deviceToLogicalYRel" arity="2" clause_i="1" since=""/>
    <fsummary>Convert <c>device</c> Y coordinate to relative logical coordinate, using the current mapping mode and user scale factor but ignoring the axis orientation. </fsummary>
    <desc><p>Convert <c>device</c> Y coordinate to relative logical coordinate, using the current mapping mode and user scale factor but ignoring the axis orientation. 
      </p><p>Use this for converting a height, for example. 
      </p></desc>
  </func>
  
  <func>
    <name name="drawArc" arity="4" clause_i="1" since=""/>
    <fsummary>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </fsummary>
    <desc><p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
      </p></desc>
  </func>
  
  <func>
    <name name="drawBitmap" arity="3" clause_i="1" since=""/>
    <fsummary>See: <c>drawBitmap/4</c></fsummary>
  </func>
  
  <func>
    <name name="drawBitmap" arity="4" clause_i="1" since=""/>
    <fsummary>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </fsummary>
    <desc><p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
      </p></desc>
  </func>
  
  <func>
    <name name="drawCheckMark" arity="2" clause_i="1" since=""/>
    <fsummary>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </fsummary>
    <desc><p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
      </p></desc>
  </func>
  
  <func>
    <name name="drawCircle" arity="3" clause_i="1" since=""/>
    <fsummary>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </fsummary>
    <desc><p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
      </p></desc>
  </func>
  
  <func>
    <name name="drawEllipse" arity="2" clause_i="1" since=""/>
    <fsummary>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </fsummary>
    <desc><p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
      </p></desc>
  </func>
  
  <func>
    <name name="drawEllipse" arity="3" clause_i="1" since=""/>
    <fsummary>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </fsummary>
    <desc><p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
      </p></desc>
  </func>
  
  <func>
    <name name="drawEllipticArc" arity="5" clause_i="1" since=""/>
    <fsummary>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </fsummary>
    <desc><p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
      </p></desc>
  </func>
  
  <func>
    <name name="drawIcon" arity="3" clause_i="1" since=""/>
    <fsummary>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </fsummary>
    <desc><p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
      </p></desc>
  </func>
  
  <func>
    <name name="drawLabel" arity="3" clause_i="1" since=""/>
    <fsummary>See: <c>drawLabel/4</c></fsummary>
  </func>
  
  <func>
    <name name="drawLabel" arity="4" clause_i="1" since=""/>
    <fsummary>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </fsummary>
    <desc><p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
      </p></desc>
  </func>
  
  <func>
    <name name="drawLine" arity="3" clause_i="1" since=""/>
    <fsummary>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </fsummary>
    <desc><p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
      </p></desc>
  </func>
  
  <func>
    <name name="drawLines" arity="2" clause_i="1" since=""/>
    <fsummary>See: <c>drawLines/3</c></fsummary>
  </func>
  
  <func>
    <name name="drawLines" arity="3" clause_i="1" since=""/>
    <fsummary>Draws lines using an array of points of size <c>n</c> adding the optional offset coordinate. </fsummary>
    <desc><p>Draws lines using an array of points of size <c>n</c> adding the optional offset coordinate. 
      </p><p>The current pen is used for drawing the lines. 
      </p></desc>
  </func>
  
  <func>
    <name name="drawPolygon" arity="2" clause_i="1" since=""/>
    <fsummary>See: <c>drawPolygon/3</c></fsummary>
  </func>
  
  <func>
    <name name="drawPolygon" arity="3" clause_i="1" since=""/>
    <fsummary>Draws a filled polygon using an array of points of size <c>n</c>, adding the optional offset coordinate. </fsummary>
    <desc><p>Draws a filled polygon using an array of points of size <c>n</c>, adding the optional offset coordinate. 
      </p><p>The first and last points are automatically closed.
      </p><p>The last argument specifies the fill rule: <c>wxODDEVEN_RULE</c> (the default) or <c>wxWINDING_RULE</c>.
      </p><p>The current pen is used for drawing the outline, and the current brush for filling the shape. Using a transparent brush suppresses filling. 
      </p></desc>
  </func>
  
  <func>
    <name name="drawPoint" arity="2" clause_i="1" since=""/>
    <fsummary>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </fsummary>
    <desc><p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
      </p></desc>
  </func>
  
  <func>
    <name name="drawRectangle" arity="2" clause_i="1" since=""/>
    <fsummary>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </fsummary>
    <desc><p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
      </p></desc>
  </func>
  
  <func>
    <name name="drawRectangle" arity="3" clause_i="1" since=""/>
    <fsummary>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </fsummary>
    <desc><p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
      </p></desc>
  </func>
  
  <func>
    <name name="drawRotatedText" arity="4" clause_i="1" since=""/>
    <fsummary>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </fsummary>
    <desc><p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
      </p></desc>
  </func>
  
  <func>
    <name name="drawRoundedRectangle" arity="3" clause_i="1" since=""/>
    <fsummary>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </fsummary>
    <desc><p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
      </p></desc>
  </func>
  
  <func>
    <name name="drawRoundedRectangle" arity="4" clause_i="1" since=""/>
    <fsummary>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </fsummary>
    <desc><p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
      </p></desc>
  </func>
  
  <func>
    <name name="drawText" arity="3" clause_i="1" since=""/>
    <fsummary>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </fsummary>
    <desc><p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
      </p></desc>
  </func>
  
  <func>
    <name name="endDoc" arity="1" clause_i="1" since=""/>
    <fsummary>Ends a document (only relevant when outputting to a printer). </fsummary>
    <desc><p>Ends a document (only relevant when outputting to a printer). 
      </p></desc>
  </func>
  
  <func>
    <name name="endPage" arity="1" clause_i="1" since=""/>
    <fsummary>Ends a document page (only relevant when outputting to a printer). </fsummary>
    <desc><p>Ends a document page (only relevant when outputting to a printer). 
      </p></desc>
  </func>
  
  <func>
    <name name="floodFill" arity="3" clause_i="1" since=""/>
    <fsummary>See: <c>floodFill/4</c></fsummary>
  </func>
  
  <func>
    <name name="floodFill" arity="4" clause_i="1" since=""/>
    <fsummary>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </fsummary>
    <desc><p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
      </p></desc>
  </func>
  
  <func>
    <name name="getBackground" arity="1" clause_i="1" since=""/>
    <fsummary>Gets the brush used for painting the background. </fsummary>
    <desc><p>Gets the brush used for painting the background. 
      </p><p>See: <seemfa marker="#setBackground/2"><c>setBackground/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="getBackgroundMode" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the current background mode: <c>wxPENSTYLE_SOLID</c> or <c>wxPENSTYLE_TRANSPARENT</c>. </fsummary>
    <desc><p>Returns the current background mode: <c>wxPENSTYLE_SOLID</c> or <c>wxPENSTYLE_TRANSPARENT</c>. 
      </p><p>See: <seemfa marker="#setBackgroundMode/2"><c>setBackgroundMode/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="getBrush" arity="1" clause_i="1" since=""/>
    <fsummary>Gets the current brush. </fsummary>
    <desc><p>Gets the current brush. 
      </p><p>See: <seemfa marker="#setBrush/2"><c>setBrush/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="getCharHeight" arity="1" clause_i="1" since=""/>
    <fsummary>Gets the character height of the currently set font. </fsummary>
    <desc><p>Gets the character height of the currently set font. 
      </p></desc>
  </func>
  
  <func>
    <name name="getCharWidth" arity="1" clause_i="1" since=""/>
    <fsummary>Gets the average character width of the currently set font. </fsummary>
    <desc><p>Gets the average character width of the currently set font. 
      </p></desc>
  </func>
  
  <func>
    <name name="getClippingBox" arity="1" clause_i="1" since=""/>
    <fsummary/>
    <desc><p><c> Gets the rectangle surrounding the current clipping region. If no clipping region is set this function returns the extent of the device context. @remarks Clipping region is given in logical coordinates. @param x If non-&lt;span class='literal'&gt;NULL&lt;/span&gt;, filled in with the logical horizontal coordinate of the top left corner of the clipping region if the function returns true or 0 otherwise. @param y If non-&lt;span class='literal'&gt;NULL&lt;/span&gt;, filled in with the logical vertical coordinate of the top left corner of the clipping region if the function returns true or 0 otherwise. @param width If non-&lt;span class='literal'&gt;NULL&lt;/span&gt;, filled in with the width of the clipping region if the function returns true or the device context width otherwise. @param height If non-&lt;span class='literal'&gt;NULL&lt;/span&gt;, filled in with the height of the clipping region if the function returns true or the device context height otherwise. </c> 
      </p><p>Return: true if there is a clipping region or false if there is no active clipping region (note that this return value is available only since wxWidgets 3.1.2, this function didn't return anything in the previous versions). 
      </p></desc>
  </func>
  
  <func>
    <name name="getFont" arity="1" clause_i="1" since=""/>
    <fsummary>Gets the current font. </fsummary>
    <desc><p>Gets the current font. 
      </p><p>Notice that even although each device context object has some default font after creation, this method would return a ?wxNullFont initially and only after calling <seemfa marker="#setFont/2"><c>setFont/2</c></seemfa> a valid font is returned. 
      </p></desc>
  </func>
  
  <func>
    <name name="getLayoutDirection" arity="1" clause_i="1" since=""/>
    <fsummary>Gets the current layout direction of the device context. </fsummary>
    <desc><p>Gets the current layout direction of the device context. 
      </p><p>On platforms where RTL layout is supported, the return value will either be <c>wxLayout_LeftToRight</c> or <c>wxLayout_RightToLeft</c>. If RTL layout is not supported, the return value will be <c>wxLayout_Default</c>.
      </p><p>See: <seemfa marker="#setLayoutDirection/2"><c>setLayoutDirection/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="getLogicalFunction" arity="1" clause_i="1" since=""/>
    <fsummary>Gets the current logical function. </fsummary>
    <desc><p>Gets the current logical function. 
      </p><p>See: <seemfa marker="#setLogicalFunction/2"><c>setLogicalFunction/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="getMapMode" arity="1" clause_i="1" since=""/>
    <fsummary>Gets the current mapping mode for the device context. </fsummary>
    <desc><p>Gets the current mapping mode for the device context. 
      </p><p>See: <seemfa marker="#setMapMode/2"><c>setMapMode/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="getMultiLineTextExtent" arity="2" clause_i="1" since=""/>
    <fsummary>Gets the dimensions of the string using the currently selected font. </fsummary>
    <desc><p>Gets the dimensions of the string using the currently selected font. 
      </p><p><c>string</c> is the text string to measure.
      </p><p>Return: The text extent as a {Width,Height} object.
      </p><p>Note: This function works with both single-line and multi-line strings.
      </p><p>See: <seeerl marker="wxFont"><c>wxFont</c></seeerl>, <seemfa marker="#setFont/2"><c>setFont/2</c></seemfa>, <seemfa marker="#getPartialTextExtents/2"><c>getPartialTextExtents/2</c></seemfa>, <seemfa marker="#getTextExtent/3"><c>getTextExtent/3</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="getMultiLineTextExtent" arity="3" clause_i="1" since=""/>
    <fsummary>Gets the dimensions of the string using the currently selected font. </fsummary>
    <desc><p>Gets the dimensions of the string using the currently selected font. 
      </p><p><c>string</c> is the text string to measure, <c>heightLine</c>, if non NULL, is where to store the height of a single line.
      </p><p>The text extent is set in the given <c>w</c> and <c>h</c> pointers.
      </p><p>If the optional parameter <c>font</c> is specified and valid, then it is used for the text extent calculation, otherwise the currently selected font is used.
      </p><p>If <c>string</c> is empty, its horizontal extent is 0 but, for convenience when using this function for allocating enough space for a possibly multi-line string, its vertical extent is the same as the height of an empty line of text. Please note that this behaviour differs from that of <seemfa marker="#getTextExtent/3"><c>getTextExtent/3</c></seemfa>.
      </p><p>Note: This function works with both single-line and multi-line strings.
      </p><p>See: <seeerl marker="wxFont"><c>wxFont</c></seeerl>, <seemfa marker="#setFont/2"><c>setFont/2</c></seemfa>, <seemfa marker="#getPartialTextExtents/2"><c>getPartialTextExtents/2</c></seemfa>, <seemfa marker="#getTextExtent/3"><c>getTextExtent/3</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="getPartialTextExtents" arity="2" clause_i="1" since=""/>
    <fsummary>Fills the <c>widths</c> array with the widths from the beginning of <c>text</c> to the corresponding character of <c>text</c>. </fsummary>
    <desc><p>Fills the <c>widths</c> array with the widths from the beginning of <c>text</c> to the corresponding character of <c>text</c>. 
      </p><p>The generic version simply builds a running total of the widths of each character using <seemfa marker="#getTextExtent/3"><c>getTextExtent/3</c></seemfa>, however if the various platforms have a native API function that is faster or more accurate than the generic implementation then it should be used instead.
      </p><p>See: <seemfa marker="#getMultiLineTextExtent/3"><c>getMultiLineTextExtent/3</c></seemfa>, <seemfa marker="#getTextExtent/3"><c>getTextExtent/3</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="getPen" arity="1" clause_i="1" since=""/>
    <fsummary>Gets the current pen. </fsummary>
    <desc><p>Gets the current pen. 
      </p><p>See: <seemfa marker="#setPen/2"><c>setPen/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="getPixel" arity="2" clause_i="1" since=""/>
    <fsummary>Gets in <c>colour</c> the colour at the specified location. </fsummary>
    <desc><p>Gets in <c>colour</c> the colour at the specified location. 
      </p><p>This method isn't available for <seeerl marker="wxPostScriptDC"><c>wxPostScriptDC</c></seeerl> or <c>wxMetafileDC</c> (not implemented in wx) nor for any DC in wxOSX port and simply returns false there.
      </p><p>Note: Setting a pixel can be done using <seemfa marker="#drawPoint/2"><c>drawPoint/2</c></seemfa>.
      </p><p>Note: This method shouldn't be used with <seeerl marker="wxPaintDC"><c>wxPaintDC</c></seeerl> as accessing the DC while drawing can result in unexpected results, notably in wxGTK. 
      </p></desc>
  </func>
  
  <func>
    <name name="getPPI" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the resolution of the device in pixels per inch. </fsummary>
    <desc><p>Returns the resolution of the device in pixels per inch. 
      </p></desc>
  </func>
  
  <func>
    <name name="getSize" arity="1" clause_i="1" since=""/>
    <fsummary>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </fsummary>
    <desc><p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
      </p></desc>
  </func>
  
  <func>
    <name name="getSizeMM" arity="1" clause_i="1" since=""/>
    <fsummary>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </fsummary>
    <desc><p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
      </p></desc>
  </func>
  
  <func>
    <name name="getTextBackground" arity="1" clause_i="1" since=""/>
    <fsummary>Gets the current text background colour. </fsummary>
    <desc><p>Gets the current text background colour. 
      </p><p>See: <seemfa marker="#setTextBackground/2"><c>setTextBackground/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="getTextExtent" arity="2" clause_i="1" since=""/>
    <fsummary>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </fsummary>
    <desc><p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
      </p></desc>
  </func>
  
  <func>
    <name name="getTextExtent" arity="3" clause_i="1" since=""/>
    <fsummary>Gets the dimensions of the string using the currently selected font. </fsummary>
    <desc><p>Gets the dimensions of the string using the currently selected font. 
      </p><p><c>string</c> is the text string to measure, <c>descent</c> is the dimension from the baseline of the font to the bottom of the descender, and <c>externalLeading</c> is any extra vertical space added to the font by the font designer (usually is zero).
      </p><p>The text extent is returned in <c>w</c> and <c>h</c> pointers or as a {Width,Height} object depending on which version of this function is used.
      </p><p>If the optional parameter <c>font</c> is specified and valid, then it is used for the text extent calculation. Otherwise the currently selected font is.
      </p><p>If <c>string</c> is empty, its extent is 0 in both directions, as expected.
      </p><p>Note: This function only works with single-line strings.
      </p><p>See: <seeerl marker="wxFont"><c>wxFont</c></seeerl>, <seemfa marker="#setFont/2"><c>setFont/2</c></seemfa>, <seemfa marker="#getPartialTextExtents/2"><c>getPartialTextExtents/2</c></seemfa>, <seemfa marker="#getMultiLineTextExtent/3"><c>getMultiLineTextExtent/3</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="getTextForeground" arity="1" clause_i="1" since=""/>
    <fsummary>Gets the current text foreground colour. </fsummary>
    <desc><p>Gets the current text foreground colour. 
      </p><p>See: <seemfa marker="#setTextForeground/2"><c>setTextForeground/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="getUserScale" arity="1" clause_i="1" since=""/>
    <fsummary>Gets the current user scale factor. </fsummary>
    <desc><p>Gets the current user scale factor. 
      </p><p>See: <seemfa marker="#setUserScale/3"><c>setUserScale/3</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="gradientFillConcentric" arity="4" clause_i="1" since=""/>
    <fsummary>Fill the area specified by rect with a radial gradient, starting from <c>initialColour</c> at the centre of the circle and fading to <c>destColour</c> on the circle outside. </fsummary>
    <desc><p>Fill the area specified by rect with a radial gradient, starting from <c>initialColour</c> at the centre of the circle and fading to <c>destColour</c> on the circle outside. 
      </p><p>The circle is placed at the centre of <c>rect</c>.
      </p><p>Note: Currently this function is very slow, don't use it for real-time drawing. 
      </p></desc>
  </func>
  
  <func>
    <name name="gradientFillConcentric" arity="5" clause_i="1" since=""/>
    <fsummary>Fill the area specified by rect with a radial gradient, starting from <c>initialColour</c> at the centre of the circle and fading to <c>destColour</c> on the circle outside. </fsummary>
    <desc><p>Fill the area specified by rect with a radial gradient, starting from <c>initialColour</c> at the centre of the circle and fading to <c>destColour</c> on the circle outside. 
      </p><p><c>circleCenter</c> are the relative coordinates of centre of the circle in the specified <c>rect</c>.
      </p><p>Note: Currently this function is very slow, don't use it for real-time drawing. 
      </p></desc>
  </func>
  
  <func>
    <name name="gradientFillLinear" arity="4" clause_i="1" since=""/>
    <fsummary>See: <c>gradientFillLinear/5</c></fsummary>
  </func>
  
  <func>
    <name name="gradientFillLinear" arity="5" clause_i="1" since=""/>
    <fsummary>Fill the area specified by <c>rect</c> with a linear gradient, starting from <c>initialColour</c> and eventually fading to <c>destColour</c>. </fsummary>
    <desc><p>Fill the area specified by <c>rect</c> with a linear gradient, starting from <c>initialColour</c> and eventually fading to <c>destColour</c>. 
      </p><p>The <c>nDirection</c> specifies the direction of the colour change, default is to use <c>initialColour</c> on the left part of the rectangle and <c>destColour</c> on the right one. 
      </p></desc>
  </func>
  
  <func>
    <name name="logicalToDeviceX" arity="2" clause_i="1" since=""/>
    <fsummary>Converts logical X coordinate to device coordinate, using the current mapping mode, user scale factor, device origin and axis orientation. </fsummary>
    <desc><p>Converts logical X coordinate to device coordinate, using the current mapping mode, user scale factor, device origin and axis orientation. 
      </p></desc>
  </func>
  
  <func>
    <name name="logicalToDeviceXRel" arity="2" clause_i="1" since=""/>
    <fsummary>Converts logical X coordinate to relative device coordinate, using the current mapping mode and user scale factor but ignoring the axis orientation. </fsummary>
    <desc><p>Converts logical X coordinate to relative device coordinate, using the current mapping mode and user scale factor but ignoring the axis orientation. 
      </p><p>Use this for converting a width, for example. 
      </p></desc>
  </func>
  
  <func>
    <name name="logicalToDeviceY" arity="2" clause_i="1" since=""/>
    <fsummary>Converts logical Y coordinate to device coordinate, using the current mapping mode, user scale factor, device origin and axis orientation. </fsummary>
    <desc><p>Converts logical Y coordinate to device coordinate, using the current mapping mode, user scale factor, device origin and axis orientation. 
      </p></desc>
  </func>
  
  <func>
    <name name="logicalToDeviceYRel" arity="2" clause_i="1" since=""/>
    <fsummary>Converts logical Y coordinate to relative device coordinate, using the current mapping mode and user scale factor but ignoring the axis orientation. </fsummary>
    <desc><p>Converts logical Y coordinate to relative device coordinate, using the current mapping mode and user scale factor but ignoring the axis orientation. 
      </p><p>Use this for converting a height, for example. 
      </p></desc>
  </func>
  
  <func>
    <name name="maxX" arity="1" clause_i="1" since=""/>
    <fsummary>Gets the maximum horizontal extent used in drawing commands so far. </fsummary>
    <desc><p>Gets the maximum horizontal extent used in drawing commands so far. 
      </p></desc>
  </func>
  
  <func>
    <name name="maxY" arity="1" clause_i="1" since=""/>
    <fsummary>Gets the maximum vertical extent used in drawing commands so far. </fsummary>
    <desc><p>Gets the maximum vertical extent used in drawing commands so far. 
      </p></desc>
  </func>
  
  <func>
    <name name="minX" arity="1" clause_i="1" since=""/>
    <fsummary>Gets the minimum horizontal extent used in drawing commands so far. </fsummary>
    <desc><p>Gets the minimum horizontal extent used in drawing commands so far. 
      </p></desc>
  </func>
  
  <func>
    <name name="minY" arity="1" clause_i="1" since=""/>
    <fsummary>Gets the minimum vertical extent used in drawing commands so far. </fsummary>
    <desc><p>Gets the minimum vertical extent used in drawing commands so far. 
      </p></desc>
  </func>
  
  <func>
    <name name="isOk" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the DC is ok to use. </fsummary>
    <desc><p>Returns true if the DC is ok to use. 
      </p></desc>
  </func>
  
  <func>
    <name name="resetBoundingBox" arity="1" clause_i="1" since=""/>
    <fsummary>Resets the bounding box: after a call to this function, the bounding box doesn't contain anything. </fsummary>
    <desc><p>Resets the bounding box: after a call to this function, the bounding box doesn't contain anything. 
      </p><p>See: <seemfa marker="#calcBoundingBox/3"><c>calcBoundingBox/3</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="setAxisOrientation" arity="3" clause_i="1" since=""/>
    <fsummary>Sets the x and y axis orientation (i.e. the direction from lowest to highest values on the axis). </fsummary>
    <desc><p>Sets the x and y axis orientation (i.e. the direction from lowest to highest values on the axis). 
      </p><p>The default orientation is x axis from left to right and y axis from top down.
      </p></desc>
  </func>
  
  <func>
    <name name="setBackground" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the current background brush for the DC. </fsummary>
    <desc><p>Sets the current background brush for the DC. 
      </p></desc>
  </func>
  
  <func>
    <name name="setBackgroundMode" arity="2" clause_i="1" since=""/>
    <fsummary><c>mode</c> may be one of <c>wxPENSTYLE_SOLID</c> and <c>wxPENSTYLE_TRANSPARENT</c>. </fsummary>
    <desc><p><c>mode</c> may be one of <c>wxPENSTYLE_SOLID</c> and <c>wxPENSTYLE_TRANSPARENT</c>. 
      </p><p>This setting determines whether text will be drawn with a background colour or not. 
      </p></desc>
  </func>
  
  <func>
    <name name="setBrush" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the current brush for the DC. </fsummary>
    <desc><p>Sets the current brush for the DC. 
      </p><p>If the argument is ?wxNullBrush (or another invalid brush; see <seemfa marker="wxBrush#isOk/1"><c>wxBrush:isOk/1</c></seemfa>), the current brush is selected out of the device context (leaving <seeerl marker="wxDC"><c>wxDC</c></seeerl> without any valid brush), allowing the current brush to be destroyed safely.
      </p><p>See: <seeerl marker="wxBrush"><c>wxBrush</c></seeerl>, <seeerl marker="wxMemoryDC"><c>wxMemoryDC</c></seeerl>, (for the interpretation of colours when drawing into a monochrome bitmap)
      </p></desc>
  </func>
  
  <func>
    <name name="setClippingRegion" arity="2" clause_i="1" since=""/>
    <fsummary>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </fsummary>
    <desc><p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
      </p></desc>
  </func>
  
  <func>
    <name name="setClippingRegion" arity="3" clause_i="1" since=""/>
    <fsummary>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </fsummary>
    <desc><p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
      </p></desc>
  </func>
  
  <func>
    <name name="setDeviceOrigin" arity="3" clause_i="1" since=""/>
    <fsummary>Sets the device origin (i.e. the origin in pixels after scaling has been applied). </fsummary>
    <desc><p>Sets the device origin (i.e. the origin in pixels after scaling has been applied). 
      </p><p>This function may be useful in Windows printing operations for placing a graphic on a page. 
      </p></desc>
  </func>
  
  <func>
    <name name="setFont" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the current font for the DC. </fsummary>
    <desc><p>Sets the current font for the DC. 
      </p><p>If the argument is ?wxNullFont (or another invalid font; see <seemfa marker="wxFont#isOk/1"><c>wxFont:isOk/1</c></seemfa>), the current font is selected out of the device context (leaving <seeerl marker="wxDC"><c>wxDC</c></seeerl> without any valid font), allowing the current font to be destroyed safely.
      </p><p>See: <seeerl marker="wxFont"><c>wxFont</c></seeerl>
      </p></desc>
  </func>
  
  <func>
    <name name="setLayoutDirection" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the current layout direction for the device context. </fsummary>
    <desc><p>Sets the current layout direction for the device context. 
      </p><p>See: <seemfa marker="#getLayoutDirection/1"><c>getLayoutDirection/1</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="setLogicalFunction" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the current logical function for the device context. </fsummary>
    <desc><p>Sets the current logical function for the device context. 
      </p><p>Note: This function is not fully supported in all ports, due to the limitations of the underlying drawing model. Notably, <c>wxINVERT</c> which was commonly used for drawing rubber bands or other moving outlines in the past, is not, and will not, be supported by wxGTK3 and wxMac. The suggested alternative is to draw temporarily objects normally and refresh the (affected part of the) window to remove them later.
      </p><p> It determines how a <c>source</c> pixel (from a pen or brush colour, or source device context if using <seemfa marker="#blit/6"><c>blit/6</c></seemfa>) combines with a <c>destination</c> pixel in the current device context. Text drawing is not affected by this function.
      </p><p>See ?wxRasterOperationMode enumeration values for more info.
      </p><p>The default is <c>wxCOPY</c>, which simply draws with the current colour. The others combine the current colour and the background using a logical operation. 
      </p></desc>
  </func>
  
  <func>
    <name name="setMapMode" arity="2" clause_i="1" since=""/>
    <fsummary>The mapping mode of the device context defines the unit of measurement used to convert <c>logical</c> units to <c>device</c> units. </fsummary>
    <desc><p>The mapping mode of the device context defines the unit of measurement used to convert <c>logical</c> units to <c>device</c> units. 
      </p><p>Note that in X, text drawing isn't handled consistently with the mapping mode; a font is always specified in point size. However, setting the user scale (see <seemfa marker="#setUserScale/3"><c>setUserScale/3</c></seemfa>) scales the text appropriately. In Windows, scalable TrueType fonts are always used; in X, results depend on availability of fonts, but usually a reasonable match is found.
      </p><p>The coordinate origin is always at the top left of the screen/printer.
      </p><p>Drawing to a Windows printer device context uses the current mapping mode, but mapping mode is currently ignored for PostScript output. 
      </p></desc>
  </func>
  
  <func>
    <name name="setPalette" arity="2" clause_i="1" since=""/>
    <fsummary>If this is a window DC or memory DC, assigns the given palette to the window or bitmap associated with the DC. </fsummary>
    <desc><p>If this is a window DC or memory DC, assigns the given palette to the window or bitmap associated with the DC. 
      </p><p>If the argument is ?wxNullPalette, the current palette is selected out of the device context, and the original palette restored.
      </p><p>See: <seeerl marker="wxPalette"><c>wxPalette</c></seeerl>
      </p></desc>
  </func>
  
  <func>
    <name name="setPen" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the current pen for the DC. </fsummary>
    <desc><p>Sets the current pen for the DC. 
      </p><p>If the argument is ?wxNullPen (or another invalid pen; see <seemfa marker="wxPen#isOk/1"><c>wxPen:isOk/1</c></seemfa>), the current pen is selected out of the device context (leaving <seeerl marker="wxDC"><c>wxDC</c></seeerl> without any valid pen), allowing the current pen to be destroyed safely.
      </p><p>See: <seeerl marker="wxMemoryDC"><c>wxMemoryDC</c></seeerl>, for the interpretation of colours when drawing into a monochrome bitmap
      </p></desc>
  </func>
  
  <func>
    <name name="setTextBackground" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the current text background colour for the DC. </fsummary>
    <desc><p>Sets the current text background colour for the DC. 
      </p></desc>
  </func>
  
  <func>
    <name name="setTextForeground" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the current text foreground colour for the DC. </fsummary>
    <desc><p>Sets the current text foreground colour for the DC. 
      </p><p>See: <seeerl marker="wxMemoryDC"><c>wxMemoryDC</c></seeerl>, for the interpretation of colours when drawing into a monochrome bitmap
      </p></desc>
  </func>
  
  <func>
    <name name="setUserScale" arity="3" clause_i="1" since=""/>
    <fsummary>Sets the user scaling factor, useful for applications which require 'zooming'. </fsummary>
    <desc><p>Sets the user scaling factor, useful for applications which require 'zooming'. 
      </p></desc>
  </func>
  
  <func>
    <name name="startDoc" arity="2" clause_i="1" since=""/>
    <fsummary>Starts a document (only relevant when outputting to a printer). </fsummary>
    <desc><p>Starts a document (only relevant when outputting to a printer). 
      </p><p><c>message</c> is a message to show while printing. 
      </p></desc>
  </func>
  
  <func>
    <name name="startPage" arity="1" clause_i="1" since=""/>
    <fsummary>Starts a document page (only relevant when outputting to a printer). </fsummary>
    <desc><p>Starts a document page (only relevant when outputting to a printer). 
      </p></desc>
  </func>
  </funcs>
</erlref>
