.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2018 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc

.. module:: wx.lib.floatcanvas.FloatCanvas

.. currentmodule:: wx.lib.floatcanvas.FloatCanvas

.. highlight:: python



.. _wx.lib.floatcanvas.FloatCanvas:

==========================================================================================================================================
|phoenix_title|  **wx.lib.floatcanvas.FloatCanvas**
==========================================================================================================================================

This is the main module of the floatcanvas package, it contains the :class:`~lib.floatcanvas.FloatCanvas.FloatCanvas`
and all the all the different objects which are sub-classed from :class:`~lib.floatcanvas.FloatCanvas.DrawObject`.

In the following very simple sample ``self`` is a frame, but it could be another
container type control::

    from wx.lib.floatcanvas import FloatCanvas

    self.Canvas = FloatCanvas.FloatCanvas(self, -1,
                                 size=(500, 500),
                                 ProjectionFun=None,
                                 Debug=0,
                                 BackgroundColor="White",
                                 )


    # add a circle
    cir = FloatCanvas.Circle((10, 10), 100)
    self.Canvas.AddObject(cir)

    # add a rectangle
    rect = FloatCanvas.Rectangle((110, 10), (100, 100), FillColor='Red')
    self.Canvas.AddObject(rect)

    self.Canvas.Draw()


Many samples are available in the `wxPhoenix/samples/floatcanvas` folder.


|class_summary| Classes Summary
===============================

================================================================================ ================================================================================
:ref:`~wx.lib.floatcanvas.FloatCanvas._MouseEvent`                               This event class takes a regular wxWindows mouse event as a parameter,
:ref:`~wx.lib.floatcanvas.FloatCanvas.FloatCanvas`                               The main class of the floatcanvas package :class:`~lib.floatcanvas.FloatCanvas`.
:ref:`~wx.lib.floatcanvas.FloatCanvas.FloatCanvasError`                          Custom FloatCanvas exception.
================================================================================ ================================================================================


|


.. toctree::
   :maxdepth: 1
   :hidden:

   wx.lib.floatcanvas.FloatCanvas._MouseEvent
   wx.lib.floatcanvas.FloatCanvas.FloatCanvas
   wx.lib.floatcanvas.FloatCanvas.FloatCanvasError



