.. 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(), width=1.0, style=PENSTYLE_SOLID) 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(), width=1.0, style=PENSTYLE_SOLID) :param `colour`: :type `colour`: wx.Colour :param `width`: :type `width`: wx.Double :param `style`: :type `style`: wx.PenStyle .. method:: Cap(self, cap) :param `cap`: :type `cap`: wx.PenCap :rtype: :ref:`wx.GraphicsPenInfo` .. method:: Colour(self, col) :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: `wx.Double` .. method:: GetEndY(self) :rtype: `wx.Double` .. method:: GetGradientType(self) :rtype: :ref:`wx.GradientType` .. method:: GetJoin(self) :rtype: :ref:`wx.PenJoin` .. method:: GetRadius(self) :rtype: `wx.Double` .. method:: GetStartX(self) :rtype: `wx.Double` .. method:: GetStartY(self) :rtype: `wx.Double` .. 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: `wx.Double` .. method:: GetX1(self) :rtype: `wx.Double` .. method:: GetX2(self) :rtype: `wx.Double` .. method:: GetY1(self) :rtype: `wx.Double` .. method:: GetY2(self) :rtype: `wx.Double` .. method:: IsTransparent(self) :rtype: `bool` .. method:: Join(self, join) :param `join`: :type `join`: wx.PenJoin :rtype: :ref:`wx.GraphicsPenInfo` .. method:: LinearGradient(self, *args, **kw) |overload| Overloaded Implementations: :html:`

` **LinearGradient** `(self, x1, y1, x2, y2, c1, c2, matrix=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, y1, x2, y2, stops, matrix=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, startY, endX, endY, radius, oColor, cColor, matrix=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, startY, endX, endY, radius, stops, matrix=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) :param `stipple`: :type `stipple`: wx.Bitmap :rtype: :ref:`wx.GraphicsPenInfo` .. method:: Style(self, style) :param `style`: :type `style`: wx.PenStyle :rtype: :ref:`wx.GraphicsPenInfo` .. method:: Width(self, width) :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`