.. 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

Inheritance diagram for class
PenInfo:
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.PenInfo.__init__`
:meth:`~wx.PenInfo.Cap`
:meth:`~wx.PenInfo.Colour`
:meth:`~wx.PenInfo.GetCap`
:meth:`~wx.PenInfo.GetColour`
:meth:`~wx.PenInfo.GetJoin`
:meth:`~wx.PenInfo.GetQuality`
:meth:`~wx.PenInfo.GetStipple`
:meth:`~wx.PenInfo.GetStyle`
:meth:`~wx.PenInfo.GetWidth`
:meth:`~wx.PenInfo.HighQuality` Set high pen quality.
:meth:`~wx.PenInfo.IsTransparent`
:meth:`~wx.PenInfo.Join`
:meth:`~wx.PenInfo.LowQuality` Set low pen quality.
:meth:`~wx.PenInfo.Quality` Set the pen quality.
:meth:`~wx.PenInfo.Stipple`
:meth:`~wx.PenInfo.Style`
:meth:`~wx.PenInfo.Width`
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: wx.PenInfo(object)
**Possible constructors**::
PenInfo(colour: Colour=Colour(), width: int=1, style:
PenStyle=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=Colour(), width: int=1, style: PenStyle=PENSTYLE_SOLID)
:param `colour`:
:type `colour`: wx.Colour
:param `width`:
:type `width`: int
:param `style`:
:type `style`: wx.PenStyle
:rtype: `None`
.. method:: Cap(self, cap : PenCap)
:param `cap`:
:type `cap`: wx.PenCap
:rtype: :ref:`wx.PenInfo`
.. method:: Colour(self, col : Colour)
:param `col`:
:type `col`: wx.Colour
:rtype: :ref:`wx.PenInfo`
.. method:: GetCap(self)
:rtype: :ref:`wx.PenCap`
.. method:: GetColour(self)
:rtype: :ref:`wx.Colour`
.. method:: GetJoin(self)
:rtype: :ref:`wx.PenJoin`
.. method:: GetQuality(self)
:rtype: :ref:`wx.PenQuality`
.. method:: GetStipple(self)
:rtype: :ref:`wx.Bitmap`
.. method:: GetStyle(self)
:rtype: :ref:`wx.PenStyle`
.. method:: GetWidth(self)
: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)
:rtype: `bool`
.. method:: Join(self, join : PenJoin)
: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 : PenQuality)
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 : Bitmap)
:param `stipple`:
:type `stipple`: wx.Bitmap
:rtype: :ref:`wx.PenInfo`
.. method:: Style(self, style : PenStyle)
:param `style`:
:type `style`: wx.PenStyle
:rtype: :ref:`wx.PenInfo`
.. method:: Width(self, width : int)
:param `width`:
:type `width`: int
:rtype: :ref:`wx.PenInfo`