.. $Id$  -*- rst -*-
.. pyformex reference manual --- canvas
.. CREATED WITH py2rst.py: DO NOT EDIT

.. include:: ../defines.inc
.. include:: ../links.inc

.. _sec:ref-canvas:

:mod:`canvas` --- This implements an OpenGL drawing widget for painting 3D scenes.
==================================================================================

.. automodule:: canvas
   :synopsis: This implements an OpenGL drawing widget for painting 3D scenes.



   .. autoclass:: ActorList


      ActorList objects have the following methods:

      .. automethod:: add(actor)
      .. automethod:: delete(actor)
      .. automethod:: redraw()

   .. autoclass:: CanvasSettings


      CanvasSettings objects have the following methods:

      .. automethod:: checkDict(clas,dict)
      .. automethod:: items()
      .. automethod:: reset(dict={})
      .. automethod:: update(dict)

   .. autoclass:: Light


      Light objects have the following methods:

      .. automethod:: set()
      .. automethod:: set_value(key,value)
      .. automethod:: enable()
      .. automethod:: disable()

   .. autoclass:: Lights


      Lights objects have the following methods:

      .. automethod:: set_value(i,key,value)
      .. automethod:: set(i)
      .. automethod:: enable()
      .. automethod:: disable()

   .. autoclass:: Canvas


      Canvas objects have the following methods:

      .. automethod:: Size()
      .. automethod:: glLightSpec()
      .. automethod:: glLight(onoff)
      .. automethod:: hasLight()
      .. automethod:: resetDefaults(dict={})
      .. automethod:: resetLighting()
      .. automethod:: resetLights()
      .. automethod:: setRenderMode(rm)
      .. automethod:: setTransparency(mode)
      .. automethod:: setLighting(mode)
      .. automethod:: setAveragedNormals(mode)
      .. automethod:: setLineWidth(lw)
      .. automethod:: setPointSize(sz)
      .. automethod:: setBgColor(color1,color2=None)
      .. automethod:: createBackground()
      .. automethod:: setFgColor(color)
      .. automethod:: setSlColor(color)
      .. automethod:: updateSettings(settings)
      .. automethod:: setLightValue(nr,key,val)
      .. automethod:: enableLight(nr)
      .. automethod:: disableLight(nr)
      .. automethod:: setTriade(on=None,pos='lb',siz=100)
      .. automethod:: initCamera()
      .. automethod:: glinit(mode=None)
      .. automethod:: glupdate()
      .. automethod:: clear()
      .. automethod:: setDefaults()
      .. automethod:: setSize(w,h)
      .. automethod:: display()
      .. automethod:: zoom_2D(zoom=None)
      .. automethod:: begin_2D_drawing()
      .. automethod:: end_2D_drawing()
      .. automethod:: setBbox(bbox=None)
      .. automethod:: addActor(actor)
      .. automethod:: removeActor(actor)
      .. automethod:: addHighlight(actor)
      .. automethod:: removeHighlight(actor)
      .. automethod:: addAnnotation(actor)
      .. automethod:: removeAnnotation(actor)
      .. automethod:: addDecoration(actor)
      .. automethod:: removeDecoration(actor)
      .. automethod:: remove(itemlist)
      .. automethod:: removeActors(actorlist=None)
      .. automethod:: removeHighlights(actorlist=None)
      .. automethod:: removeAnnotations(actorlist=None)
      .. automethod:: removeDecorations(actorlist=None)
      .. automethod:: removeAll()
      .. automethod:: redrawAll()
      .. automethod:: setCamera(bbox=None,angles=None)
      .. automethod:: zoom(f,dolly=True)
      .. automethod:: project(x,y,z,locked=False)
      .. automethod:: unProject(x,y,z,locked=False)
      .. automethod:: zoomRectangle(x0,y0,x1,y1)
      .. automethod:: zoomAll()
      .. automethod:: saveBuffer()
      .. automethod:: showBuffer()
      .. automethod:: draw_focus_rectangle(width=2)
      .. automethod:: draw_cursor(x,y)
      .. automethod:: draw_rectangle(x,y)

**Functions defined in the module canvas**

   .. autofunction:: gl_pickbuffer()
   .. autofunction:: glFillMode(mode)
   .. autofunction:: glFrontFill()
   .. autofunction:: glBackFill()
   .. autofunction:: glBothFill()
   .. autofunction:: glFill()
   .. autofunction:: glLine()
   .. autofunction:: glLineSmooth(onoff)
   .. autofunction:: glSmooth()
   .. autofunction:: glFlat()
   .. autofunction:: onOff(onoff)
   .. autofunction:: glEnable(facility,onoff)
   .. autofunction:: glCulling(onoff=True)
   .. autofunction:: glNoCulling()
   .. autofunction:: glLighting(onoff)
   .. autofunction:: glPolygonFillMode(mode)
   .. autofunction:: glPolygonMode(mode)
   .. autofunction:: glShadeModel(model)
   .. autofunction:: glSettings(settings)

   
.. moduleauthor:: pyFormex project (http://pyformex.org)

.. End

