1fb07ece0SStephan Aßmus /* 2325a6253SAxel Dörfler * Copyright 2006-2007, Haiku. 3fb07ece0SStephan Aßmus * Distributed under the terms of the MIT License. 4fb07ece0SStephan Aßmus * 5fb07ece0SStephan Aßmus * Authors: 6fb07ece0SStephan Aßmus * Stephan Aßmus <superstippi@gmx.de> 7fb07ece0SStephan Aßmus */ 8fb07ece0SStephan Aßmus #ifndef AFFINE_TRANSFORMER_H 9fb07ece0SStephan Aßmus #define AFFINE_TRANSFORMER_H 10fb07ece0SStephan Aßmus 11325a6253SAxel Dörfler 1225dc253dSIngo Weinhold #include "IconBuild.h" 13*c6c2c042SZardshard #include "PathTransformer.h" 14325a6253SAxel Dörfler #include "Transformer.h" 15325a6253SAxel Dörfler 16fb07ece0SStephan Aßmus #include <agg_conv_transform.h> 17fb07ece0SStephan Aßmus #include <agg_trans_affine.h> 18fb07ece0SStephan Aßmus 19325a6253SAxel Dörfler 2025dc253dSIngo Weinhold _BEGIN_ICON_NAMESPACE 2125dc253dSIngo Weinhold 22fb07ece0SStephan Aßmus 23fb07ece0SStephan Aßmus typedef agg::conv_transform<VertexSource, 24fb07ece0SStephan Aßmus agg::trans_affine> Affine; 25fb07ece0SStephan Aßmus 26fb07ece0SStephan Aßmus class AffineTransformer : public Transformer, 27*c6c2c042SZardshard public PathTransformer, 28fb07ece0SStephan Aßmus public Affine, 29fb07ece0SStephan Aßmus public agg::trans_affine { 30fb07ece0SStephan Aßmus public: 31fb07ece0SStephan Aßmus enum { 32fb07ece0SStephan Aßmus archive_code = 'affn', 33fb07ece0SStephan Aßmus }; 34fb07ece0SStephan Aßmus 35fb07ece0SStephan Aßmus AffineTransformer( 36fb07ece0SStephan Aßmus VertexSource& source); 37fb07ece0SStephan Aßmus AffineTransformer( 38fb07ece0SStephan Aßmus VertexSource& source, 39fb07ece0SStephan Aßmus BMessage* archive); 408b8d44bfSMichael Lotz 41fb07ece0SStephan Aßmus virtual ~AffineTransformer(); 42fb07ece0SStephan Aßmus 43*c6c2c042SZardshard // Transformer interface 44*c6c2c042SZardshard virtual Transformer* Clone() const; 45fb07ece0SStephan Aßmus 46*c6c2c042SZardshard // PathTransformer interface 47fb07ece0SStephan Aßmus virtual void rewind(unsigned path_id); 48fb07ece0SStephan Aßmus virtual unsigned vertex(double* x, double* y); 49fb07ece0SStephan Aßmus 50fb07ece0SStephan Aßmus virtual void SetSource(VertexSource& source); 51fb07ece0SStephan Aßmus 52fb07ece0SStephan Aßmus virtual double ApproximationScale() const; 53fb07ece0SStephan Aßmus 54fb07ece0SStephan Aßmus #ifdef ICON_O_MATIC 55fb07ece0SStephan Aßmus // IconObject interface 56fb07ece0SStephan Aßmus virtual status_t Archive(BMessage* into, 57fb07ece0SStephan Aßmus bool deep = true) const; 58fb07ece0SStephan Aßmus 59fb07ece0SStephan Aßmus virtual PropertyObject* MakePropertyObject() const; 60fb07ece0SStephan Aßmus virtual bool SetToPropertyObject( 61fb07ece0SStephan Aßmus const PropertyObject* object); 62fb07ece0SStephan Aßmus #endif 63fb07ece0SStephan Aßmus }; 64fb07ece0SStephan Aßmus 6525dc253dSIngo Weinhold 6625dc253dSIngo Weinhold _END_ICON_NAMESPACE 6725dc253dSIngo Weinhold 68325a6253SAxel Dörfler 69fb07ece0SStephan Aßmus #endif // AFFINE_TRANSFORMER_H 70