1/*
2 * Copyright 2005, Stephan Aßmus <superstippi@gmx.de>. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 *
5 * Simple BShape to agg::path_storage converter, implemented as BShapeIterator.
6 *
7 */
8
9
10#ifndef SHAPE_CONVERTER_H
11#define SHAPE_CONVERTER_H
12
13#include <Shape.h>
14
15#include <agg_path_storage.h>
16
17#include "Transformable.h"
18
19class BPoint;
20
21// TODO: test if this actually works
22
23class ShapeConverter : public BShapeIterator,
24					   public Transformable {
25 public:
26								ShapeConverter();
27								ShapeConverter(agg::path_storage* path);
28	virtual						~ShapeConverter() {};
29
30			void				SetPath(agg::path_storage* path);
31
32	virtual	status_t			IterateMoveTo(BPoint* point);
33	virtual	status_t			IterateLineTo(int32 lineCount, BPoint* linePts);
34	virtual	status_t			IterateBezierTo(int32 bezierCount, BPoint* bezierPts);
35	virtual	status_t			IterateClose();
36
37 private:
38	agg::path_storage*			fPath;
39};
40
41#endif // SHAPE_CONVERTER_H
42