xref: /haiku/src/libs/icon/transformer/ContourTransformer.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 CONTOUR_TRANSFORMER_H
10 #define CONTOUR_TRANSFORMER_H
11 
12 #include <agg_conv_contour.h>
13 
14 #include "Transformer.h"
15 
16 typedef agg::conv_contour<VertexSource>		Contour;
17 
18 class ContourTransformer : public Transformer,
19 						   public Contour {
20  public:
21 	enum {
22 		archive_code	= 'cntr',
23 	};
24 
25 								ContourTransformer(
26 									VertexSource& source);
27 #ifdef ICON_O_MATIC
28 								ContourTransformer(
29 									VertexSource& source,
30 									BMessage* archive);
31 #endif
32 	virtual						~ContourTransformer();
33 
34 	virtual	Transformer*		Clone(VertexSource& source) const;
35 
36 	virtual	void				rewind(unsigned path_id);
37     virtual	unsigned			vertex(double* x, double* y);
38 
39 	virtual	void				SetSource(VertexSource& source);
40 
41 	virtual	double				ApproximationScale() const;
42 
43 #ifdef ICON_O_MATIC
44 	// IconObject interface
45 	virtual	status_t			Archive(BMessage* into,
46 										bool deep = true) const;
47 
48 	virtual	PropertyObject*		MakePropertyObject() const;
49 	virtual	bool				SetToPropertyObject(
50 									const PropertyObject* object);
51 #endif
52 };
53 
54 #endif // CONTOUR_TRANSFORMER_H
55