Filters and funnels

Filters and funnels control the enumeration and processing of canvas graphics. Canvas-graphic filters set up an enumerated list of canvas graphics, and canvas-graphic funnels process the graphics in the enumerated list. For example, you might enumerate graphics in the representation from back to front and then pass them to the funnel to draw them on the canvas view from back to front.

The enumeration and processing of canvas graphics is done in the TCanvasView::EnumerateGraphics function, which is called by the canvas view. This function takes a filter and a funnel as parameters.

    unsigned long TCanvasView::EnumerateGraphics( TCanvasFilter&, TCanvasFunnel& );
EnumerateGraphics encapsulates any special access protocol of the underlying canvas representation, such as document entries. Passing a filter and funnel to EnumerateGraphics separates the details of accessing the representation data, iteration control, and what happens to each graphic. Each operation is independently extensible without affecting the others. That is, the same drawing code (encapsulated in a funnel) can be reused regardless of the canvas representation and enumeration strategy in use.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker