.. include:: headings.inc .. currentmodule:: lib.graphics .. highlight:: python .. _lib.graphics.GraphicsBrush: ========================================================================================================================================== |phoenix_title| **GraphicsBrush** ========================================================================================================================================== A Brush is used to define how fills are painted. They can have either a solid fill (colors with or without alpha), a stipple created from a wx.Bitmap, or a cairo Pattern object. | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for class **GraphicsBrush** .. raw:: html

Inheritance diagram of GraphicsBrush

| |super_classes| Known Superclasses ================================== :class:`lib.graphics.GraphicsObject` | |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~lib.graphics.GraphicsBrush.__init__` :meth:`~lib.graphics.GraphicsBrush.Apply` :meth:`~lib.graphics.GraphicsBrush.CreateFromBrush` Converts a wx.Brush to a GraphicsBrush :meth:`~lib.graphics.GraphicsBrush.CreateFromPattern` Create a Brush directly from a Cairo Pattern object. This is ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~lib.graphics.GraphicsBrush.Colour` :attr:`~lib.graphics.GraphicsBrush.Pattern` :attr:`~lib.graphics.GraphicsBrush.Stipple` :attr:`~lib.graphics.GraphicsBrush.Style` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: GraphicsBrush(GraphicsObject) A Brush is used to define how fills are painted. They can have either a solid fill (colors with or without alpha), a stipple created from a wx.Bitmap, or a cairo Pattern object. .. method:: __init__(self, colour=BLACK, style=SOLID) .. method:: Apply(self, ctx) .. staticmethod:: CreateFromBrush(brush) Converts a wx.Brush to a GraphicsBrush .. staticmethod:: CreateFromPattern(pattern) Create a Brush directly from a Cairo Pattern object. This is similar to using a stipple bitmap, but saves a step, and patterns can include gradients, etc. .. attribute:: Colour See :meth:`~GraphicsBrush.fset` , :meth:`~GraphicsBrush.fget` .. attribute:: Pattern See :meth:`~GraphicsBrush.fset` , :meth:`~GraphicsBrush.fget` .. attribute:: Stipple See :meth:`~GraphicsBrush.fset` , :meth:`~GraphicsBrush.fget` .. attribute:: Style See :meth:`~GraphicsBrush.fset` , :meth:`~GraphicsBrush.fget`