.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2020 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc



.. _wx.PenInfo:

==========================================================================================================================================
|phoenix_title|  **wx.PenInfo**
==========================================================================================================================================

This class is a helper used for :ref:`wx.Pen`  creation using named parameter idiom: it allows specifying various :ref:`wx.Pen`  attributes using the chained calls to its clearly named methods instead of passing them in the fixed order to :ref:`wx.Pen`  constructors. 
         

For instance, to create a dotted blue pen with the given join style you could do ::

    pen = wx.Pen(wx.PenInfo(wx.BLUE).Style(wx.PENSTYLE_DOT).Join(wx.JOIN_BEVEL))




         



.. versionadded:: 4.1/wxWidgets-3.1.1  
     







|

|class_hierarchy| Class Hierarchy
=================================

.. raw:: html

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>PenInfo</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.PenInfo_inheritance.svg" alt="Inheritance diagram of PenInfo" usemap="#dummy" class="inheritance"/></center>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.PenInfo.html" title="This class is a helper used for wx.Pen  creation using named parameter idiom: it allows specifying various wx.Pen  attributes using the chained calls to its clearly named methods instead of passing them in the fixed order to wx.Pen  constructors." alt="" coords="5,5,113,34"/> </map> 
   </p>
   </div>

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.PenInfo.__init__`                                                     Constructor, which can set the colour, width and style for the pen.
:meth:`~wx.PenInfo.Cap`                                                          Sets the cap (i.e., the end point) for the pen.
:meth:`~wx.PenInfo.Colour`                                                       Sets the colour for the pen.
:meth:`~wx.PenInfo.GetCap`                                                       Returns the pen's cap (i.e., end-point style).
:meth:`~wx.PenInfo.GetColour`                                                    Returns the pen's colour.
:meth:`~wx.PenInfo.GetJoin`                                                      Returns the pen's joining method.
:meth:`~wx.PenInfo.GetQuality`                                                   Returns the pen's quality.
:meth:`~wx.PenInfo.GetStipple`                                                   Returns the pen's stipple bitmap.
:meth:`~wx.PenInfo.GetStyle`                                                     Returns the pen's style.
:meth:`~wx.PenInfo.GetWidth`                                                     Returns the pen's line width.
:meth:`~wx.PenInfo.HighQuality`                                                  Set high pen quality.
:meth:`~wx.PenInfo.IsTransparent`                                                Returns whether the pen is transparent.
:meth:`~wx.PenInfo.Join`                                                         Sets the join for the pen, which is the appearance of where two lines meet or overlap.
:meth:`~wx.PenInfo.LowQuality`                                                   Set low pen quality.
:meth:`~wx.PenInfo.Quality`                                                      Set the pen quality.
:meth:`~wx.PenInfo.Stipple`                                                      Sets the bitmap used for stippling.
:meth:`~wx.PenInfo.Style`                                                        Sets the style for the pen.
:meth:`~wx.PenInfo.Width`                                                        Sets the line width for the pen.
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: wx.PenInfo(object)

   **Possible constructors**::

       PenInfo(colour=Colour(), width=1, style=PENSTYLE_SOLID) -> None
       
   
   This class is a helper used for Pen creation using named parameter
   idiom: it allows specifying various Pen attributes using the chained
   calls to its clearly named methods instead of passing them in the
   fixed order to Pen constructors.



   .. method:: __init__(self, colour=Colour(), width=1, style=PENSTYLE_SOLID)

      Constructor, which can set the colour, width and style for the pen. 
                 


      :param `colour`: 
      :type `colour`: wx.Colour
      :param `width`: 
      :type `width`: int
      :param `style`: 
      :type `style`: wx.PenStyle




      :rtype: `None`     








   .. method:: Cap(self, cap)

      Sets the cap (i.e., the end point) for the pen. 
                 


      :param `cap`: 
      :type `cap`: wx.PenCap




      :rtype: :ref:`wx.PenInfo`








   .. method:: Colour(self, col)

      Sets the colour for the pen. 
                 


      :param `col`: 
      :type `col`: wx.Colour




      :rtype: :ref:`wx.PenInfo`








   .. method:: GetCap(self)

      Returns the pen's cap (i.e., end-point style). 
                 

      :rtype: :ref:`wx.PenCap`








   .. method:: GetColour(self)

      Returns the pen's colour. 
                 

      :rtype: :ref:`wx.Colour`








   .. method:: GetJoin(self)

      Returns the pen's joining method. 
                 

      :rtype: :ref:`wx.PenJoin`








   .. method:: GetQuality(self)

      Returns the pen's quality. 
                 

      :rtype: :ref:`wx.PenQuality`








   .. method:: GetStipple(self)

      Returns the pen's stipple bitmap. 
                 

      :rtype: :ref:`wx.Bitmap`








   .. method:: GetStyle(self)

      Returns the pen's style. 
                 

      :rtype: :ref:`wx.PenStyle`








   .. method:: GetWidth(self)

      Returns the pen's line width. 
                 

      :rtype: `int`








   .. method:: HighQuality(self)

      Set high pen quality. 
                 

      This is the same as calling :meth:`Quality`   with ``PEN_QUALITY_HIGH``. 


                

      :rtype: :ref:`wx.PenInfo`







      .. versionadded:: 4.1/wxWidgets-3.1.5  
     








   .. method:: IsTransparent(self)

      Returns whether the pen is transparent. 
                 

      :rtype: `bool`








   .. method:: Join(self, join)

      Sets the join for the pen, which is the appearance of where two lines meet or overlap. 
                 


      :param `join`: 
      :type `join`: wx.PenJoin




      :rtype: :ref:`wx.PenInfo`








   .. method:: LowQuality(self)

      Set low pen quality. 
                 

      This is the same as calling :meth:`Quality`   with ``PEN_QUALITY_LOW``. 


                

      :rtype: :ref:`wx.PenInfo`







      .. versionadded:: 4.1/wxWidgets-3.1.5  
     








   .. method:: Quality(self, quality)

      Set the pen quality. 
                 

      Using :meth:`LowQuality`   or :meth:`HighQuality`   is usually more convenient. 


                


      :param `quality`: 
      :type `quality`: wx.PenQuality




      :rtype: :ref:`wx.PenInfo`







      .. versionadded:: 4.1/wxWidgets-3.1.5  
     







      .. seealso:: :meth:`wx.Pen.SetQuality`   








   .. method:: Stipple(self, stipple)

      Sets the bitmap used for stippling. 
                 

      When the pen is used, a repeating pattern of this bitmap will be drawn. 
                 


      :param `stipple`: 
      :type `stipple`: wx.Bitmap




      :rtype: :ref:`wx.PenInfo`








   .. method:: Style(self, style)

      Sets the style for the pen. 
                 


      :param `style`: 
      :type `style`: wx.PenStyle




      :rtype: :ref:`wx.PenInfo`








   .. method:: Width(self, width)

      Sets the line width for the pen. 
                 


      :param `width`: 
      :type `width`: int




      :rtype: :ref:`wx.PenInfo`







