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