.. 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.GraphicsPenInfo:
==========================================================================================================================================
|phoenix_title| **wx.GraphicsPenInfo**
==========================================================================================================================================
This class is a helper used for :ref:`wx.GraphicsPen` creation using named parameter idiom: it allows specifying various :ref:`wx.GraphicsPen` attributes using the chained calls to its clearly named methods instead of passing them in the fixed order to :ref:`wx.GraphicsPen` constructors.
Typically you would use :ref:`wx.GraphicsPenInfo` with a :ref:`wx.GraphicsContext`, e.g. to start drawing with a dotted blue pen slightly wider than normal you could write the following: ::
ctx = wx.GraphicsContext.Create(dc)
pen = ctx.CreatePen(wx.GraphicsPenInfo(wx.BLUE).Width(1.25).Style(wx.PENSTYLE_DOT))
ctx.SetPen(pen)
.. versionadded:: 4.1/wxWidgets-3.1.1
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html

Inheritance diagram for class
GraphicsPenInfo:
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.GraphicsPenInfo.__init__`
:meth:`~wx.GraphicsPenInfo.Cap`
:meth:`~wx.GraphicsPenInfo.Colour`
:meth:`~wx.GraphicsPenInfo.GetCap`
:meth:`~wx.GraphicsPenInfo.GetColour`
:meth:`~wx.GraphicsPenInfo.GetEndX`
:meth:`~wx.GraphicsPenInfo.GetEndY`
:meth:`~wx.GraphicsPenInfo.GetGradientType`
:meth:`~wx.GraphicsPenInfo.GetJoin`
:meth:`~wx.GraphicsPenInfo.GetRadius`
:meth:`~wx.GraphicsPenInfo.GetStartX`
:meth:`~wx.GraphicsPenInfo.GetStartY`
:meth:`~wx.GraphicsPenInfo.GetStipple`
:meth:`~wx.GraphicsPenInfo.GetStops`
:meth:`~wx.GraphicsPenInfo.GetStyle`
:meth:`~wx.GraphicsPenInfo.GetWidth`
:meth:`~wx.GraphicsPenInfo.GetX1`
:meth:`~wx.GraphicsPenInfo.GetX2`
:meth:`~wx.GraphicsPenInfo.GetY1`
:meth:`~wx.GraphicsPenInfo.GetY2`
:meth:`~wx.GraphicsPenInfo.IsTransparent`
:meth:`~wx.GraphicsPenInfo.Join`
:meth:`~wx.GraphicsPenInfo.LinearGradient`
:meth:`~wx.GraphicsPenInfo.RadialGradient`
:meth:`~wx.GraphicsPenInfo.Stipple`
:meth:`~wx.GraphicsPenInfo.Style`
:meth:`~wx.GraphicsPenInfo.Width`
================================================================================ ================================================================================
|
|property_summary| Properties Summary
=====================================
================================================================================ ================================================================================
:attr:`~wx.GraphicsPenInfo.EndX` See :meth:`~wx.GraphicsPenInfo.GetEndX`
:attr:`~wx.GraphicsPenInfo.EndY` See :meth:`~wx.GraphicsPenInfo.GetEndY`
:attr:`~wx.GraphicsPenInfo.GradientType` See :meth:`~wx.GraphicsPenInfo.GetGradientType`
:attr:`~wx.GraphicsPenInfo.Radius` See :meth:`~wx.GraphicsPenInfo.GetRadius`
:attr:`~wx.GraphicsPenInfo.StartX` See :meth:`~wx.GraphicsPenInfo.GetStartX`
:attr:`~wx.GraphicsPenInfo.StartY` See :meth:`~wx.GraphicsPenInfo.GetStartY`
:attr:`~wx.GraphicsPenInfo.Stops` See :meth:`~wx.GraphicsPenInfo.GetStops`
:attr:`~wx.GraphicsPenInfo.X1` See :meth:`~wx.GraphicsPenInfo.GetX1`
:attr:`~wx.GraphicsPenInfo.X2` See :meth:`~wx.GraphicsPenInfo.GetX2`
:attr:`~wx.GraphicsPenInfo.Y1` See :meth:`~wx.GraphicsPenInfo.GetY1`
:attr:`~wx.GraphicsPenInfo.Y2` See :meth:`~wx.GraphicsPenInfo.GetY2`
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: wx.GraphicsPenInfo(object)
**Possible constructors**::
GraphicsPenInfo(colour: Colour=Colour(), width: float=1.0, style:
PenStyle=PENSTYLE_SOLID) -> None
This class is a helper used for GraphicsPen creation using named
parameter idiom: it allows specifying various GraphicsPen attributes
using the chained calls to its clearly named methods instead of
passing them in the fixed order to GraphicsPen constructors.
.. method:: __init__(self, colour: Colour=Colour(), width: float=1.0, style: PenStyle=PENSTYLE_SOLID)
:param `colour`:
:type `colour`: wx.Colour
:param `width`:
:type `width`: wx.Double
:param `style`:
:type `style`: wx.PenStyle
:rtype: `None`
.. method:: Cap(self, cap : PenCap)
:param `cap`:
:type `cap`: wx.PenCap
:rtype: :ref:`wx.GraphicsPenInfo`
.. method:: Colour(self, col : Colour)
:param `col`:
:type `col`: wx.Colour
:rtype: :ref:`wx.GraphicsPenInfo`
.. method:: GetCap(self)
:rtype: :ref:`wx.PenCap`
.. method:: GetColour(self)
:rtype: :ref:`wx.Colour`
.. method:: GetEndX(self)
:rtype: `float`
.. method:: GetEndY(self)
:rtype: `float`
.. method:: GetGradientType(self)
:rtype: :ref:`wx.GradientType`
.. method:: GetJoin(self)
:rtype: :ref:`wx.PenJoin`
.. method:: GetRadius(self)
:rtype: `float`
.. method:: GetStartX(self)
:rtype: `float`
.. method:: GetStartY(self)
:rtype: `float`
.. method:: GetStipple(self)
:rtype: :ref:`wx.Bitmap`
.. method:: GetStops(self)
:rtype: :ref:`wx.GraphicsGradientStops`
.. method:: GetStyle(self)
:rtype: :ref:`wx.PenStyle`
.. method:: GetWidth(self)
:rtype: `float`
.. method:: GetX1(self)
:rtype: `float`
.. method:: GetX2(self)
:rtype: `float`
.. method:: GetY1(self)
:rtype: `float`
.. method:: GetY2(self)
:rtype: `float`
.. method:: IsTransparent(self)
:rtype: `bool`
.. method:: Join(self, join : PenJoin)
:param `join`:
:type `join`: wx.PenJoin
:rtype: :ref:`wx.GraphicsPenInfo`
.. method:: LinearGradient(self, *args, **kw)
|overload| **Overloaded Implementations:**
:html:`
`
**LinearGradient** `(self, x1 : float, y1 : float, x2 : float, y2 : float, c1 : Colour, c2 : Colour, matrix: GraphicsMatrix=NullGraphicsMatrix)`
:param `x1`:
:type `x1`: wx.Double
:param `y1`:
:type `y1`: wx.Double
:param `x2`:
:type `x2`: wx.Double
:param `y2`:
:type `y2`: wx.Double
:param `c1`:
:type `c1`: wx.Colour
:param `c2`:
:type `c2`: wx.Colour
:param `matrix`:
:type `matrix`: wx.GraphicsMatrix
:rtype: :ref:`wx.GraphicsPenInfo`
:html:`
`
**LinearGradient** `(self, x1 : float, y1 : float, x2 : float, y2 : float, stops : GraphicsGradientStops, matrix: GraphicsMatrix=NullGraphicsMatrix)`
:param `x1`:
:type `x1`: wx.Double
:param `y1`:
:type `y1`: wx.Double
:param `x2`:
:type `x2`: wx.Double
:param `y2`:
:type `y2`: wx.Double
:param `stops`:
:type `stops`: wx.GraphicsGradientStops
:param `matrix`:
:type `matrix`: wx.GraphicsMatrix
:rtype: :ref:`wx.GraphicsPenInfo`
:html:`
`
.. method:: RadialGradient(self, *args, **kw)
|overload| **Overloaded Implementations:**
:html:`
`
**RadialGradient** `(self, startX : float, startY : float, endX : float, endY : float, radius : float, oColor : Colour, cColor : Colour, matrix: GraphicsMatrix=NullGraphicsMatrix)`
:param `startX`:
:type `startX`: wx.Double
:param `startY`:
:type `startY`: wx.Double
:param `endX`:
:type `endX`: wx.Double
:param `endY`:
:type `endY`: wx.Double
:param `radius`:
:type `radius`: wx.Double
:param `oColor`:
:type `oColor`: wx.Colour
:param `cColor`:
:type `cColor`: wx.Colour
:param `matrix`:
:type `matrix`: wx.GraphicsMatrix
:rtype: :ref:`wx.GraphicsPenInfo`
:html:`
`
**RadialGradient** `(self, startX : float, startY : float, endX : float, endY : float, radius : float, stops : GraphicsGradientStops, matrix: GraphicsMatrix=NullGraphicsMatrix)`
:param `startX`:
:type `startX`: wx.Double
:param `startY`:
:type `startY`: wx.Double
:param `endX`:
:type `endX`: wx.Double
:param `endY`:
:type `endY`: wx.Double
:param `radius`:
:type `radius`: wx.Double
:param `stops`:
:type `stops`: wx.GraphicsGradientStops
:param `matrix`:
:type `matrix`: wx.GraphicsMatrix
:rtype: :ref:`wx.GraphicsPenInfo`
:html:`
`
.. method:: Stipple(self, stipple : Bitmap)
:param `stipple`:
:type `stipple`: wx.Bitmap
:rtype: :ref:`wx.GraphicsPenInfo`
.. method:: Style(self, style : PenStyle)
:param `style`:
:type `style`: wx.PenStyle
:rtype: :ref:`wx.GraphicsPenInfo`
.. method:: Width(self, width : float)
:param `width`:
:type `width`: wx.Double
:rtype: :ref:`wx.GraphicsPenInfo`
.. attribute:: EndX
See :meth:`~wx.GraphicsPenInfo.GetEndX`
.. attribute:: EndY
See :meth:`~wx.GraphicsPenInfo.GetEndY`
.. attribute:: GradientType
See :meth:`~wx.GraphicsPenInfo.GetGradientType`
.. attribute:: Radius
See :meth:`~wx.GraphicsPenInfo.GetRadius`
.. attribute:: StartX
See :meth:`~wx.GraphicsPenInfo.GetStartX`
.. attribute:: StartY
See :meth:`~wx.GraphicsPenInfo.GetStartY`
.. attribute:: Stops
See :meth:`~wx.GraphicsPenInfo.GetStops`
.. attribute:: X1
See :meth:`~wx.GraphicsPenInfo.GetX1`
.. attribute:: X2
See :meth:`~wx.GraphicsPenInfo.GetX2`
.. attribute:: Y1
See :meth:`~wx.GraphicsPenInfo.GetY1`
.. attribute:: Y2
See :meth:`~wx.GraphicsPenInfo.GetY2`