Package gaphas :: Module painter

Module painter

source code

The painter module provides different painters for parts of the canvas.

Painters can be swapped in and out.

Each painter takes are of a layer in the canvas (such as grid, items and handles).


Version: $Revision: 1715 $

Classes
  Painter
Painter interface.
  PainterChain
Chain up a set of painters.
  DrawContext
Special context for draw()'ing the item.
  ItemPainter
  CairoBoundingBoxContext
Delegate all calls to the wrapped CairoBoundingBoxContext, intercept stroke(), fill() and a few others so the bounding box of the item involved can be calculated.
  BoundingBoxPainter
This specific case of an ItemPainter is used to calculate the bounding boxes (in canvas coordinates) for the items.
  HandlePainter
Draw handles of items that are marked as selected in the view.
  ToolPainter
ToolPainter allows the Tool defined on a view to do some special drawing.
Functions
 
DefaultPainter()
Default painter, containing item, handle and tool painters.
source code
Variables
  DEBUG_DRAW_BOUNDING_BOX = False
  TOLERANCE = 0.8