.. 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 .. currentmodule:: wx.lib.floatcanvas.FCObjects .. highlight:: python .. _wx.lib.floatcanvas.FCObjects.DrawObject: ========================================================================================================================================== |phoenix_title| **wx.lib.floatcanvas.FCObjects.DrawObject** ========================================================================================================================================== This is the base class for all the objects that can be drawn. One must subclass from this (and an assortment of Mixins) to create a new DrawObject, see for example :class:`~lib.floatcanvas.FloatCanvas.Circle`. | |class_hierarchy| Class Hierarchy ================================= .. raw:: html
Inheritance diagram for class DrawObject:
| |sub_classes| Known Subclasses ============================== :class:`wx.lib.floatcanvas.FCObjects.Arc`, :class:`wx.lib.floatcanvas.FCObjects.Arrow`, :class:`wx.lib.floatcanvas.FCObjects.ArrowLine`, :class:`wx.lib.floatcanvas.FCObjects.Bitmap`, :class:`wx.lib.floatcanvas.FCObjects.Circle`, :class:`wx.lib.floatcanvas.FCObjects.Group`, :class:`wx.lib.floatcanvas.FCObjects.Line`, :class:`wx.lib.floatcanvas.FCObjects.PieChart`, :class:`wx.lib.floatcanvas.FCObjects.Point`, :class:`wx.lib.floatcanvas.FCObjects.PointSet`, :class:`wx.lib.floatcanvas.FCObjects.Polygon`, :class:`wx.lib.floatcanvas.FCObjects.RectEllipse`, :class:`wx.lib.floatcanvas.FCObjects.ScaledBitmap`, :class:`wx.lib.floatcanvas.FCObjects.ScaledBitmap2`, :class:`wx.lib.floatcanvas.FCObjects.ScaledText`, :class:`wx.lib.floatcanvas.FCObjects.ScaledTextBox`, :class:`wx.lib.floatcanvas.FCObjects.SquarePoint`, :class:`wx.lib.floatcanvas.FCObjects.Text` | |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~wx.lib.floatcanvas.FCObjects.DrawObject.__init__` Default class constructor. :meth:`~wx.lib.floatcanvas.FCObjects.DrawObject.Bind` Bind an event to the DrawObject :meth:`~wx.lib.floatcanvas.FCObjects.DrawObject.Hide` Hide the object. :meth:`~wx.lib.floatcanvas.FCObjects.DrawObject.PutInBackground` Put the object in the background. :meth:`~wx.lib.floatcanvas.FCObjects.DrawObject.PutInForeground` Put the object in the foreground. :meth:`~wx.lib.floatcanvas.FCObjects.DrawObject.SetBrush` Set the brush for this DrawObject :meth:`~wx.lib.floatcanvas.FCObjects.DrawObject.SetColor` Set the Color - this method is overridden in the subclasses :meth:`~wx.lib.floatcanvas.FCObjects.DrawObject.SetFillColor` Set the FillColor - this method is overridden in the subclasses :meth:`~wx.lib.floatcanvas.FCObjects.DrawObject.SetFillStyle` Set the FillStyle - this method is overridden in the subclasses :meth:`~wx.lib.floatcanvas.FCObjects.DrawObject.SetHitBrush` Set the brush used for hit test, do not call directly. :meth:`~wx.lib.floatcanvas.FCObjects.DrawObject.SetHitPen` Set the pen used for hit test, do not call directly. :meth:`~wx.lib.floatcanvas.FCObjects.DrawObject.SetLineColor` Set the LineColor - this method is overridden in the subclasses :meth:`~wx.lib.floatcanvas.FCObjects.DrawObject.SetLineStyle` Set the LineStyle - this method is overridden in the subclasses :meth:`~wx.lib.floatcanvas.FCObjects.DrawObject.SetLineWidth` Set the LineWidth :meth:`~wx.lib.floatcanvas.FCObjects.DrawObject.SetPen` Set the Pen for this DrawObject :meth:`~wx.lib.floatcanvas.FCObjects.DrawObject.Show` Show the object. :meth:`~wx.lib.floatcanvas.FCObjects.DrawObject.UnBindAll` Unbind all events ================================================================================ ================================================================================ | |api| Class API =============== .. class:: DrawObject This is the base class for all the objects that can be drawn. One must subclass from this (and an assortment of Mixins) to create a new DrawObject, see for example :class:`~lib.floatcanvas.FloatCanvas.Circle`. .. method:: __init__(self, InForeground = False, IsVisible = True) Default class constructor. :param boolean `InForeground`: Define if object should be in foreground or not :param boolean `IsVisible`: Define if object should be visible .. method:: Bind(self, Event, CallBackFun) Bind an event to the DrawObject :param `Event`: see below for supported event types - EVT_FC_LEFT_DOWN - EVT_FC_LEFT_UP - EVT_FC_LEFT_DCLICK - EVT_FC_MIDDLE_DOWN - EVT_FC_MIDDLE_UP - EVT_FC_MIDDLE_DCLICK - EVT_FC_RIGHT_DOWN - EVT_FC_RIGHT_UP - EVT_FC_RIGHT_DCLICK - EVT_FC_ENTER_OBJECT - EVT_FC_LEAVE_OBJECT :param `CallBackFun`: the call back function for the event .. method:: Hide(self) Hide the object. .. method:: PutInBackground(self) Put the object in the background. .. method:: PutInForeground(self) Put the object in the foreground. .. method:: SetBrush(self, FillColor, FillStyle) Set the brush for this DrawObject :param `FillColor`: see :meth:`~lib.floatcanvas.FloatCanvas.DrawObject.SetColor` for valid entries :param `FillStyle`: see :meth:`~lib.floatcanvas.FloatCanvas.DrawObject.SetFillStyle` for valid entries .. method:: SetColor(self, Color) Set the Color - this method is overridden in the subclasses :param `Color`: use one of the following values any valid entry from :class:`wx.ColourDatabase` - ``Green`` - ``White`` - ``Black`` - ``Grey`` - ``MediumGrey`` - ``LightGrey`` - ``Cyan`` - ``Red`` .. method:: SetFillColor(self, FillColor) Set the FillColor - this method is overridden in the subclasses :param `FillColor`: see :meth:`~lib.floatcanvas.FloatCanvas.DrawObject.SetColor` for valid values .. method:: SetFillStyle(self, FillStyle) Set the FillStyle - this method is overridden in the subclasses :param string `FillStyle`: following is a list of valid values: ===================== ========================================= Style Description ===================== ========================================= ``Transparent`` Transparent fill ``Solid`` Solid fill ``BiDiagonalHatch`` Bi Diagonal hatch fill ``CrossDiagHatch`` Cross Diagonal hatch fill ``FDiagonal_Hatch`` F Diagonal hatch fill ``CrossHatch`` Cross hatch fill ``HorizontalHatch`` Horizontal hatch fill ``VerticalHatch`` Vertical hatch fill ===================== ========================================= .. method:: SetHitBrush(self, HitColor) Set the brush used for hit test, do not call directly. :param `HitColor`: see :meth:`~lib.floatcanvas.FloatCanvas.DrawObject.SetColor` .. method:: SetHitPen(self, HitColor, LineWidth) Set the pen used for hit test, do not call directly. :param `HitColor`: see :meth:`~lib.floatcanvas.FloatCanvas.DrawObject.SetColor` :param integer `LineWidth`: the line width in pixels .. method:: SetLineColor(self, LineColor) Set the LineColor - this method is overridden in the subclasses :param `LineColor`: see :meth:`~lib.floatcanvas.FloatCanvas.DrawObject.SetColor` for valid values .. method:: SetLineStyle(self, LineStyle) Set the LineStyle - this method is overridden in the subclasses :param `LineStyle`: Use one of the following values or ``None`` : ===================== ============================= Style Description ===================== ============================= ``Solid`` Solid line ``Transparent`` A transparent line ``Dot`` Dotted line ``LongDash`` Dashed line (long) ``ShortDash`` Dashed line (short) ``DotDash`` Dash-dot-dash line ===================== ============================= .. method:: SetLineWidth(self, LineWidth) Set the LineWidth :param integer `LineWidth`: sets the line width in pixel .. method:: SetPen(self, LineColor, LineStyle, LineWidth) Set the Pen for this DrawObject :param `LineColor`: see :meth:`~lib.floatcanvas.FloatCanvas.DrawObject.SetColor` for valid entries :param `LineStyle`: see :meth:`~lib.floatcanvas.FloatCanvas.DrawObject.SetLineStyle` for valid entries :param integer `LineWidth`: the width in pixels .. method:: Show(self) Show the object. .. method:: UnBindAll(self) Unbind all events .. note:: Currently only removes one from each list