phoenix_title wx.GraphicsPenInfo

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

Typically you would use wx.GraphicsPenInfo with a 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)

New in version 4.1/wxWidgets-3.1.1.


class_hierarchy Class Hierarchy

Inheritance diagram for class GraphicsPenInfo:

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.


Methods

__init__(self, colour=Colour(), width=1.0, style=PENSTYLE_SOLID)
Parameters


Cap(self, cap)
Parameters

cap (PenCap) –

Return type

wx.GraphicsPenInfo



Colour(self, col)
Parameters

col (wx.Colour) –

Return type

wx.GraphicsPenInfo



GetCap(self)
Return type

wx.PenCap



GetColour(self)
Return type

wx.Colour



GetEndX(self)
Return type

wx.Double



GetEndY(self)
Return type

wx.Double



GetGradientType(self)
Return type

wx.GradientType



GetJoin(self)
Return type

wx.PenJoin



GetRadius(self)
Return type

wx.Double



GetStartX(self)
Return type

wx.Double



GetStartY(self)
Return type

wx.Double



GetStipple(self)
Return type

wx.Bitmap



GetStops(self)
Return type

wx.GraphicsGradientStops



GetStyle(self)
Return type

wx.PenStyle



GetWidth(self)
Return type

wx.Double



GetX1(self)
Return type

wx.Double



GetX2(self)
Return type

wx.Double



GetY1(self)
Return type

wx.Double



GetY2(self)
Return type

wx.Double



IsTransparent(self)
Return type

bool



Join(self, join)
Parameters

join (PenJoin) –

Return type

wx.GraphicsPenInfo



LinearGradient(self, *args, **kw)

overload Overloaded Implementations:



LinearGradient (self, x1, y1, x2, y2, c1, c2, matrix=NullGraphicsMatrix)

Parameters
Return type

wx.GraphicsPenInfo



LinearGradient (self, x1, y1, x2, y2, stops, matrix=NullGraphicsMatrix)

Parameters
Return type

wx.GraphicsPenInfo





RadialGradient(self, *args, **kw)

overload Overloaded Implementations:



RadialGradient (self, startX, startY, endX, endY, radius, oColor, cColor, matrix=NullGraphicsMatrix)

Parameters
  • startX (wx.Double) –

  • startY (wx.Double) –

  • endX (wx.Double) –

  • endY (wx.Double) –

  • radius (wx.Double) –

  • oColor (wx.Colour) –

  • cColor (wx.Colour) –

  • matrix (wx.GraphicsMatrix) –

Return type

wx.GraphicsPenInfo



RadialGradient (self, startX, startY, endX, endY, radius, stops, matrix=NullGraphicsMatrix)

Parameters
Return type

wx.GraphicsPenInfo





Stipple(self, stipple)
Parameters

stipple (wx.Bitmap) –

Return type

wx.GraphicsPenInfo



Style(self, style)
Parameters

style (PenStyle) –

Return type

wx.GraphicsPenInfo



Width(self, width)
Parameters

width (wx.Double) –

Return type

wx.GraphicsPenInfo


Properties

EndX

See GetEndX



EndY

See GetEndY



GradientType

See GetGradientType



Radius

See GetRadius



StartX

See GetStartX



StartY

See GetStartY



Stops

See GetStops



X1

See GetX1



X2

See GetX2



Y1

See GetY1



Y2

See GetY2