<?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>
    <holder>Ericsson AB. All Rights Reserved.</holder></copyright>
  <legalnotice>
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.

  </legalnotice>
  <title>wxGraphicsContext</title>
</header>
<module>wxGraphicsContext</module>
<modulesummary>Functions for wxGraphicsContext class</modulesummary>
<description><p>A <seeerl marker="wxGraphicsContext"><c>wxGraphicsContext</c></seeerl> instance is the object that is drawn upon. It is created by a renderer using <seemfa marker="wxGraphicsRenderer#createContext/2"><c>wxGraphicsRenderer:createContext/2</c></seemfa>. This can be either directly using a renderer instance, or indirectly using the static convenience <seemfa marker="#create/1"><c>create/1</c></seemfa> functions of <seeerl marker="wxGraphicsContext"><c>wxGraphicsContext</c></seeerl> that always delegate the task to the default renderer.
      </p><p>Remark: For some renderers (like Direct2D or Cairo) processing of drawing operations may be deferred (Direct2D render target normally builds up a batch of rendering commands but defers processing of these commands, Cairo operates on a separate surface) so to make drawing results visible you need to update the content of the context by calling <c>wxGraphicsContext::Flush()</c> (not implemented in wx) or by destroying the context.
      </p><p>See: <seemfa marker="wxGraphicsRenderer#createContext/2"><c>wxGraphicsRenderer:createContext/2</c></seemfa>, <seeerl marker="wxGCDC"><c>wxGCDC</c></seeerl>, <seeerl marker="wxDC"><c>wxDC</c></seeerl>
      </p>
  <p>This class is derived (and can use functions) from: 
    <seeerl marker="wxGraphicsObject"><c>wxGraphicsObject</c></seeerl></p>
  
  <p>wxWidgets docs: <url href="https://docs.wxwidgets.org/3.1/classwx_graphics_context.html">wxGraphicsContext</url></p>
  </description>
<datatypes><datatype><name name="wxGraphicsContext"/></datatype></datatypes>

<funcs>
  <func>
    <name name="destroy" arity="1" clause_i="1" since=""/>
    <fsummary>Creates a <c>wxGraphicsContext</c> from a <c>wxWindow</c>. </fsummary>
    <desc><p>Creates a <seeerl marker="wxGraphicsContext"><c>wxGraphicsContext</c></seeerl> from a <seeerl marker="wxWindow"><c>wxWindow</c></seeerl>. 
      </p><p>See: <seemfa marker="wxGraphicsRenderer#createContext/2"><c>wxGraphicsRenderer:createContext/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="create" arity="0" clause_i="1" since=""/>
    <fsummary>Create a lightweight context that can be used only for measuring text. </fsummary>
    <desc><p>Create a lightweight context that can be used only for measuring text. 
      </p></desc>
  </func>
  
  <func>
    <name name="create" arity="1" clause_i="1" since=""/>
    <fsummary>Creates a <c>wxGraphicsContext</c> from a <c>wxWindowDC</c>. </fsummary>
    <desc><p>Creates a <seeerl marker="wxGraphicsContext"><c>wxGraphicsContext</c></seeerl> from a <seeerl marker="wxWindowDC"><c>wxWindowDC</c></seeerl>. 
      </p><p>See: <seemfa marker="wxGraphicsRenderer#createContext/2"><c>wxGraphicsRenderer:createContext/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="createPen" arity="2" clause_i="1" since=""/>
    <fsummary>Creates a native pen from a <c>wxPen</c>. </fsummary>
    <desc><p>Creates a native pen from a <seeerl marker="wxPen"><c>wxPen</c></seeerl>. 
      </p><p>Prefer to use the overload taking <c>wxGraphicsPenInfo</c> (not implemented in wx) unless you already have a <seeerl marker="wxPen"><c>wxPen</c></seeerl> as constructing one only to pass it to this method is wasteful. 
      </p></desc>
  </func>
  
  <func>
    <name name="createBrush" arity="2" clause_i="1" since=""/>
    <fsummary>Creates a native brush from a <c>wxBrush</c>. </fsummary>
    <desc><p>Creates a native brush from a <seeerl marker="wxBrush"><c>wxBrush</c></seeerl>. 
      </p></desc>
  </func>
  
  <func>
    <name name="createRadialGradientBrush" arity="7" 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="createRadialGradientBrush" arity="8" clause_i="1" since=""/>
    <fsummary/>
    <desc><p><c> Creates a native brush with a radial gradient. The brush originates at (@a startX, @a startY) and ends on a circle around (@a endX, @a endY) with the given @a radius. The gradient may be specified either by its start and end colours @a oColor and @a cColor or by a full set of gradient @a stops. The version taking wxGraphicsGradientStops is new in wxWidgets 2.9.1. </c>
      </p><p>The ability to apply a transformation matrix to the gradient was added in 3.1.3 
      </p></desc>
  </func>
  
  <func>
    <name name="createLinearGradientBrush" arity="6" 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="createLinearGradientBrush" arity="7" clause_i="1" since=""/>
    <fsummary/>
    <desc><p><c> Creates a native brush with a linear gradient. The brush starts at (@a x1, @a y1) and ends at (@a x2, @a y2). Either just the start and end gradient colours (@a c1 and @a c2) or full set of gradient @a stops can be specified. The version taking wxGraphicsGradientStops is new in wxWidgets 2.9.1. </c>
      </p><p>The <c>matrix</c> parameter was added in wxWidgets 3.1.3 
      </p></desc>
  </func>
  
  <func>
    <name name="createFont" arity="2" clause_i="1" since=""/>
    <fsummary>See: <c>createFont/3</c></fsummary>
  </func>
  
  <func>
    <name name="createFont" arity="3" clause_i="1" since=""/>
  
    <name name="createFont" arity="3" clause_i="2" since=""/>
    <fsummary>Creates a native graphics font from a <c>wxFont</c> and a text colour. </fsummary>
    <desc><p>Creates a native graphics font from a <seeerl marker="wxFont"><c>wxFont</c></seeerl> and a text colour. 
      </p><p>Remark: For Direct2D graphics fonts can be created from TrueType fonts only. 
      </p></desc>
  </func>
  
  <func>
    <name name="createFont" arity="4" clause_i="1" since=""/>
    <fsummary>Creates a font object with the specified attributes. </fsummary>
    <desc><p>Creates a font object with the specified attributes. 
      </p><p>The use of overload taking <seeerl marker="wxFont"><c>wxFont</c></seeerl> is preferred, see <seemfa marker="wxGraphicsRenderer#createFont/4"><c>wxGraphicsRenderer:createFont/4</c></seemfa> for more details.
      </p><p>Remark: For Direct2D graphics fonts can be created from TrueType fonts only.
      </p><p>Since: 2.9.3 
      </p></desc>
  </func>
  
  <func>
    <name name="createMatrix" arity="1" clause_i="1" since=""/>
    <fsummary>See: <c>createMatrix/2</c></fsummary>
  </func>
  
  <func>
    <name name="createMatrix" arity="2" clause_i="1" since=""/>
    <fsummary>Creates a native affine transformation matrix from the passed in values. </fsummary>
    <desc><p>Creates a native affine transformation matrix from the passed in values. 
      </p><p>The default parameters result in an identity matrix. 
      </p></desc>
  </func>
  
  <func>
    <name name="createPath" arity="1" clause_i="1" since=""/>
    <fsummary>Creates a native graphics path which is initially empty. </fsummary>
    <desc><p>Creates a native graphics path which is initially empty. 
      </p></desc>
  </func>
  
  <func>
    <name name="clip" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the clipping region to the intersection of the given region and the previously set clipping region. </fsummary>
    <desc><p>Sets the clipping region to the intersection of the given region and the previously set clipping region. 
      </p><p>The clipping region is an area to which drawing is restricted.
      </p><p>Remark:  
      </p></desc>
  </func>
  
  <func>
    <name name="clip" 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="resetClip" arity="1" clause_i="1" since=""/>
    <fsummary>Resets the clipping to original shape. </fsummary>
    <desc><p>Resets the clipping to original shape. 
      </p></desc>
  </func>
  
  <func>
    <name name="drawBitmap" arity="6" clause_i="1" since=""/>
    <fsummary>Draws the bitmap. </fsummary>
    <desc><p>Draws the bitmap. 
      </p><p>In case of a mono bitmap, this is treated as a mask and the current brushed is used for filling. 
      </p></desc>
  </func>
  
  <func>
    <name name="drawEllipse" arity="5" clause_i="1" since=""/>
    <fsummary>Draws an ellipse. </fsummary>
    <desc><p>Draws an ellipse. 
      </p></desc>
  </func>
  
  <func>
    <name name="drawIcon" arity="6" clause_i="1" since=""/>
    <fsummary>Draws the icon. </fsummary>
    <desc><p>Draws the icon. 
      </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 a polygon. </fsummary>
    <desc><p>Draws a polygon. 
      </p></desc>
  </func>
  
  <func>
    <name name="drawPath" arity="2" clause_i="1" since=""/>
    <fsummary>See: <c>drawPath/3</c></fsummary>
  </func>
  
  <func>
    <name name="drawPath" arity="3" clause_i="1" since=""/>
    <fsummary>Draws the path by first filling and then stroking. </fsummary>
    <desc><p>Draws the path by first filling and then stroking. 
      </p></desc>
  </func>
  
  <func>
    <name name="drawRectangle" arity="5" clause_i="1" since=""/>
    <fsummary>Draws a rectangle. </fsummary>
    <desc><p>Draws a rectangle. 
      </p></desc>
  </func>
  
  <func>
    <name name="drawRoundedRectangle" arity="6" clause_i="1" since=""/>
    <fsummary>Draws a rounded rectangle. </fsummary>
    <desc><p>Draws a rounded rectangle. 
      </p></desc>
  </func>
  
  <func>
    <name name="drawText" arity="4" clause_i="1" since=""/>
    <fsummary>Draws text at the defined position. </fsummary>
    <desc><p>Draws text at the defined position. 
      </p></desc>
  </func>
  
  <func>
    <name name="drawText" arity="5" clause_i="1" since=""/>
  
    <name name="drawText" arity="5" clause_i="2" since=""/>
    <fsummary>Draws text at the defined position. </fsummary>
    <desc><p>Draws text at the defined position. 
      </p></desc>
  </func>
  
  <func>
    <name name="drawText" arity="6" clause_i="1" since=""/>
    <fsummary>Draws text at the defined position. </fsummary>
    <desc><p>Draws text at the defined position. 
      </p></desc>
  </func>
  
  <func>
    <name name="fillPath" arity="2" clause_i="1" since=""/>
    <fsummary>See: <c>fillPath/3</c></fsummary>
  </func>
  
  <func>
    <name name="fillPath" arity="3" clause_i="1" since=""/>
    <fsummary>Fills the path with the current brush. </fsummary>
    <desc><p>Fills the path with the current brush. 
      </p></desc>
  </func>
  
  <func>
    <name name="strokePath" arity="2" clause_i="1" since=""/>
    <fsummary>Strokes along a path with the current pen. </fsummary>
    <desc><p>Strokes along a path with the current pen. 
      </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></desc>
  </func>
  
  <func>
    <name name="getTextExtent" 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></desc>
  </func>
  
  <func>
    <name name="rotate" arity="2" clause_i="1" since=""/>
    <fsummary>Rotates the current transformation matrix (in radians). </fsummary>
    <desc><p>Rotates the current transformation matrix (in radians). 
      </p></desc>
  </func>
  
  <func>
    <name name="scale" arity="3" clause_i="1" since=""/>
    <fsummary>Scales the current transformation matrix. </fsummary>
    <desc><p>Scales the current transformation matrix. 
      </p></desc>
  </func>
  
  <func>
    <name name="translate" arity="3" clause_i="1" since=""/>
    <fsummary>Translates the current transformation matrix. </fsummary>
    <desc><p>Translates the current transformation matrix. 
      </p></desc>
  </func>
  
  <func>
    <name name="getTransform" arity="1" clause_i="1" since=""/>
    <fsummary>Gets the current transformation matrix of this context. </fsummary>
    <desc><p>Gets the current transformation matrix of this context. 
      </p></desc>
  </func>
  
  <func>
    <name name="setTransform" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the current transformation matrix of this context. </fsummary>
    <desc><p>Sets the current transformation matrix of this context. 
      </p></desc>
  </func>
  
  <func>
    <name name="concatTransform" arity="2" clause_i="1" since=""/>
    <fsummary>Concatenates the passed in transform with the current transform of this context. </fsummary>
    <desc><p>Concatenates the passed in transform with the current transform of this context. 
      </p></desc>
  </func>
  
  <func>
    <name name="setBrush" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the brush for filling paths. </fsummary>
    <desc><p>Sets the brush for filling paths. 
      </p></desc>
  </func>
  
  <func>
    <name name="setFont" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the font for drawing text. </fsummary>
    <desc><p>Sets the font for drawing text. 
      </p></desc>
  </func>
  
  <func>
    <name name="setFont" arity="3" clause_i="1" since=""/>
    <fsummary>Sets the font for drawing text. </fsummary>
    <desc><p>Sets the font for drawing text. 
      </p><p>Remark: For Direct2D only TrueType fonts can be used. 
      </p></desc>
  </func>
  
  <func>
    <name name="setPen" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the pen used for stroking. </fsummary>
    <desc><p>Sets the pen used for stroking. 
      </p></desc>
  </func>
  
  <func>
    <name name="strokeLine" arity="5" clause_i="1" since=""/>
    <fsummary>Strokes a single line. </fsummary>
    <desc><p>Strokes a single line. 
      </p></desc>
  </func>
  
  <func>
    <name name="strokeLines" arity="2" clause_i="1" since=""/>
    <fsummary>Stroke lines connecting all the points. </fsummary>
    <desc><p>Stroke lines connecting all the points. 
      </p><p>Unlike the other overload of this function, this method draws a single polyline and not a number of disconnected lines. 
      </p></desc>
  </func>
  </funcs>
</erlref>
