<?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>wxPen</title>
</header>
<module>wxPen</module>
<modulesummary>Functions for wxPen class</modulesummary>
<description><p>A pen is a drawing tool for drawing outlines. It is used for drawing lines and painting the outline of rectangles, ellipses, etc. It has a colour, a width and a style.
      </p><p>Note: On a monochrome display, wxWidgets shows all non-white pens as black.
      </p><p> Do not initialize objects on the stack before the program commences, since other required structures may not have been set up yet. Instead, define global pointers to objects and create them in <c>wxApp::OnInit()</c> (not implemented in wx) or when required.
      </p><p>An application may wish to dynamically create pens with different characteristics, and there is the consequent danger that a large number of duplicate pens will be created. Therefore an application may wish to get a pointer to a pen by using the global list of pens ?wxThePenList, and calling the member function <c>wxPenList::FindOrCreatePen()</c> (not implemented in wx). See <c>wxPenList</c> (not implemented in wx) for more info.
      </p><p>This class uses reference counting and copy-on-write internally so that assignments between two instances of this class are very cheap. You can therefore use actual objects instead of pointers without efficiency problems. If an instance of this class is changed it will create its own data internally so that other instances, which previously shared the data using the reference counting, are not affected.
      </p><p>Predefined objects/pointers: 
      </p><p>See: <c>wxPenList</c> (not implemented in wx), <seeerl marker="wxDC"><c>wxDC</c></seeerl>, <seemfa marker="wxDC#setPen/2"><c>wxDC:setPen/2</c></seemfa>
      </p>
  <p>wxWidgets docs: <url href="https://docs.wxwidgets.org/3.1/classwx_pen.html">wxPen</url></p>
  </description>
<datatypes><datatype><name name="wxPen"/></datatype></datatypes>

<funcs>
  <func>
    <name name="new" arity="0" clause_i="1" since=""/>
    <fsummary>Default constructor. </fsummary>
    <desc><p>Default constructor. 
      </p><p>The pen will be uninitialised, and <seemfa marker="#isOk/1"><c>isOk/1</c></seemfa> will return false. 
      </p></desc>
  </func>
  
  <func>
    <name name="new" arity="1" clause_i="1" since=""/>
  
    <name name="new" arity="1" clause_i="2" since=""/>
    <fsummary>Copy constructor, uses overview_refcount. </fsummary>
    <desc><p>Copy constructor, uses overview_refcount. 
      </p></desc>
  </func>
  
  <func>
    <name name="new" arity="2" clause_i="1" since=""/>
    <fsummary>Constructs a pen from a colour object, pen width and style. </fsummary>
    <desc><p>Constructs a pen from a colour object, pen width and style. 
      </p><p>Remark: Different versions of Windows and different versions of other platforms support very different subsets of the styles above so handle with care.
      </p><p>See: <seemfa marker="#setStyle/2"><c>setStyle/2</c></seemfa>, <seemfa marker="#setColour/4"><c>setColour/4</c></seemfa>, <seemfa marker="#setWidth/2"><c>setWidth/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="destroy" arity="1" clause_i="1" since=""/>
    <fsummary>Destructor. </fsummary>
    <desc><p>Destructor. 
      </p><p>See: reference-counted object destruction
      </p><p>Remark: Although all remaining pens are deleted when the application exits, the application should try to clean up all pens itself. This is because wxWidgets cannot know if a pointer to the pen object is stored in an application data structure, and there is a risk of double deletion. 
      </p></desc>
  </func>
  
  <func>
    <name name="getCap" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the pen cap style, which may be one of <c>wxCAP_ROUND</c>, <c>wxCAP_PROJECTING</c> and <c>wxCAP_BUTT</c>. </fsummary>
    <desc><p>Returns the pen cap style, which may be one of <c>wxCAP_ROUND</c>, <c>wxCAP_PROJECTING</c> and <c>wxCAP_BUTT</c>. 
      </p><p>The default is <c>wxCAP_ROUND</c>.
      </p><p>See: <seemfa marker="#setCap/2"><c>setCap/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="getColour" arity="1" clause_i="1" since=""/>
    <fsummary>Returns a reference to the pen colour. </fsummary>
    <desc><p>Returns a reference to the pen colour. 
      </p><p>See: <seemfa marker="#setColour/4"><c>setColour/4</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="getJoin" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the pen join style, which may be one of <c>wxJOIN_BEVEL</c>, <c>wxJOIN_ROUND</c> and <c>wxJOIN_MITER</c>. </fsummary>
    <desc><p>Returns the pen join style, which may be one of <c>wxJOIN_BEVEL</c>, <c>wxJOIN_ROUND</c> and <c>wxJOIN_MITER</c>. 
      </p><p>The default is <c>wxJOIN_ROUND</c>.
      </p><p>See: <seemfa marker="#setJoin/2"><c>setJoin/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="getStyle" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the pen style. </fsummary>
    <desc><p>Returns the pen style. 
      </p><p>See: <seemfa marker="#new/2"><c>new/2</c></seemfa>, <seemfa marker="#setStyle/2"><c>setStyle/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="getWidth" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the pen width. </fsummary>
    <desc><p>Returns the pen width. 
      </p><p>See: <seemfa marker="#setWidth/2"><c>setWidth/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="isOk" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the pen is initialised. </fsummary>
    <desc><p>Returns true if the pen is initialised. 
      </p><p>Notice that an uninitialized pen object can't be queried for any pen properties and all calls to the accessor methods on it will result in an assert failure. 
      </p></desc>
  </func>
  
  <func>
    <name name="setCap" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the pen cap style, which may be one of <c>wxCAP_ROUND</c>, <c>wxCAP_PROJECTING</c> and <c>wxCAP_BUTT</c>. </fsummary>
    <desc><p>Sets the pen cap style, which may be one of <c>wxCAP_ROUND</c>, <c>wxCAP_PROJECTING</c> and <c>wxCAP_BUTT</c>. 
      </p><p>The default is <c>wxCAP_ROUND</c>.
      </p><p>See: <seemfa marker="#getCap/1"><c>getCap/1</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="setColour" arity="2" clause_i="1" since=""/>
    <fsummary>The pen's colour is changed to the given colour. </fsummary>
    <desc><p>The pen's colour is changed to the given colour. 
      </p><p>See: <seemfa marker="#getColour/1"><c>getColour/1</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="setColour" arity="4" clause_i="1" since=""/>
    <fsummary/>
    <desc/>
  </func>
  
  <func>
    <name name="setJoin" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the pen join style, which may be one of <c>wxJOIN_BEVEL</c>, <c>wxJOIN_ROUND</c> and <c>wxJOIN_MITER</c>. </fsummary>
    <desc><p>Sets the pen join style, which may be one of <c>wxJOIN_BEVEL</c>, <c>wxJOIN_ROUND</c> and <c>wxJOIN_MITER</c>. 
      </p><p>The default is <c>wxJOIN_ROUND</c>.
      </p><p>See: <seemfa marker="#getJoin/1"><c>getJoin/1</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="setStyle" arity="2" clause_i="1" since=""/>
    <fsummary>Set the pen style. </fsummary>
    <desc><p>Set the pen style. 
      </p><p>See: <seemfa marker="#new/2"><c>new/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="setWidth" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the pen width. </fsummary>
    <desc><p>Sets the pen width. 
      </p><p>See: <seemfa marker="#getWidth/1"><c>getWidth/1</c></seemfa>
      </p></desc>
  </func>
  </funcs>
</erlref>
