The Interface Kit Table of Contents     The Interface Kit Index

BShapeIterator

Derived from: (none)

Declared in: be/interface/Shape.h

Library: libbe.so

Allocation: Constructor only

Summary

Applications can create classes derived from BShapeIterator to iterate over the components of a BShape object. There are four virtual functions that the application must implement to process the four graphics commands described in the BShape documentation: MoveTo(), LineTo(), BezierTo(), and Close().

These functions can be implemented to do anything they like with the commands (rendering them to the screen comes to mind as one possibility).


Constructor and Destructor


BShapeIterator()

                                                         
  

BShapeIterator()

Constructor.


~BShapeIterator()

                                                         
  

virtual ~BShapeIterator()

Destructor.


Member Functions


Iterate()

                                                         
  

status_t Iterate(BShape *shape)

Iterate() iterates over each command that comprises the shape, in order, calling the Iterate...() function that corresponds to each command.

RETURN CODES

B_OK. No error.


IterateBezierTo() , IterateClose() , IterateLineTo() , IterateMoveTo()

                                                         
  

virtual status_t IterateBezierTo(int32 bezierCount, BPoint * bezierPoints)

virtual status_t IterateClose(void)

virtual status_t IterateLineTo(int32 lineCount, BPoint * linePoints)

virtual status_t IterateMoveTo(BPoint * point)

These functions are called by Iterate() to process the shape commands. Your BShapeIterator-derived class must implement these four functions.


The Interface Kit Table of Contents     The Interface Kit Index


The Be Book,
...in lovely HTML...
for BeOS Release 5.

Copyright © 2000 Be, Inc. All rights reserved..