xref: /haiku/src/libs/icon/transformer/PathSource.h (revision 1564b19c80637a2ba13949db0056215699b7b418)
1 /*
2  * Copyright 2006, Haiku.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Stephan Aßmus <superstippi@gmx.de>
7  */
8 
9 #ifndef PATH_SOURCE_H
10 #define PATH_SOURCE_H
11 
12 #include "Transformer.h"
13 
14 #include "agg_path_storage.h"
15 #include "agg_conv_curve.h"
16 
17 class PathContainer;
18 class VectorPath;
19 
20 typedef agg::path_storage					AGGPath;
21 typedef agg::conv_curve<AGGPath>			AGGCurvedPath;
22 
23 class PathSource : public VertexSource {
24  public:
25 								PathSource(PathContainer* paths);
26 	virtual						~PathSource();
27 
28     virtual	void				rewind(unsigned path_id);
29     virtual	unsigned			vertex(double* x, double* y);
30 
31 	virtual	bool				WantsOpenPaths() const;
32 	virtual	double				ApproximationScale() const;
33 
34 	// PathSource
35 			void				Update(bool leavePathsOpen,
36 									   double approximationScale);
37 
38  private:
39 		 	PathContainer*		fPaths;
40 		 	AGGPath				fAGGPath;
41 		 	AGGCurvedPath		fAGGCurvedPath;
42 };
43 
44 #endif // PATH_SOURCE_H
45