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:

method_summary Methods Summary

__init__

Cap

Colour

GetCap

GetColour

GetEndX

GetEndY

GetGradientType

GetJoin

GetRadius

GetStartX

GetStartY

GetStipple

GetStops

GetStyle

GetWidth

GetX1

GetX2

GetY1

GetY2

IsTransparent

Join

LinearGradient

RadialGradient

Stipple

Style

Width


property_summary Properties Summary

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


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.


Methods

__init__(self, colour: Colour=Colour(), width: float=1.0, style: PenStyle=PENSTYLE_SOLID)
Parameters:
Return type:

None



Cap(self, cap : PenCap)
Parameters:

cap (PenCap) –

Return type:

wx.GraphicsPenInfo



Colour(self, col : Colour)
Parameters:

col (wx.Colour) –

Return type:

wx.GraphicsPenInfo



GetCap(self)
Return type:

wx.PenCap



GetColour(self)
Return type:

wx.Colour



GetEndX(self)
Return type:

float



GetEndY(self)
Return type:

float



GetGradientType(self)
Return type:

wx.GradientType



GetJoin(self)
Return type:

wx.PenJoin



GetRadius(self)
Return type:

float



GetStartX(self)
Return type:

float



GetStartY(self)
Return type:

float



GetStipple(self)
Return type:

wx.Bitmap



GetStops(self)
Return type:

wx.GraphicsGradientStops



GetStyle(self)
Return type:

wx.PenStyle



GetWidth(self)
Return type:

float



GetX1(self)
Return type:

float



GetX2(self)
Return type:

float



GetY1(self)
Return type:

float



GetY2(self)
Return type:

float



IsTransparent(self)
Return type:

bool



Join(self, join : PenJoin)
Parameters:

join (PenJoin) –

Return type:

wx.GraphicsPenInfo



LinearGradient(self, *args, **kw)

overload Overloaded Implementations:



LinearGradient (self, x1 : float, y1 : float, x2 : float, y2 : float, c1 : Colour, c2 : Colour, matrix: GraphicsMatrix=NullGraphicsMatrix)

Parameters:
Return type:

wx.GraphicsPenInfo



LinearGradient (self, x1 : float, y1 : float, x2 : float, y2 : float, stops : GraphicsGradientStops, matrix: GraphicsMatrix=NullGraphicsMatrix)

Parameters:
Return type:

wx.GraphicsPenInfo





RadialGradient(self, *args, **kw)

overload Overloaded Implementations:



RadialGradient (self, startX : float, startY : float, endX : float, endY : float, radius : float, oColor : Colour, cColor : Colour, matrix: GraphicsMatrix=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 : float, startY : float, endX : float, endY : float, radius : float, stops : GraphicsGradientStops, matrix: GraphicsMatrix=NullGraphicsMatrix)

Parameters:
Return type:

wx.GraphicsPenInfo





Stipple(self, stipple : Bitmap)
Parameters:

stipple (wx.Bitmap) –

Return type:

wx.GraphicsPenInfo



Style(self, style : PenStyle)
Parameters:

style (PenStyle) –

Return type:

wx.GraphicsPenInfo



Width(self, width : float)
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