1 /* 2 * Copyright 2006-2007, Haiku. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Stephan Aßmus <superstippi@gmx.de> 7 */ 8 #ifndef TRANSFORM_POINTS_COMMAND_H 9 #define TRANSFORM_POINTS_COMMAND_H 10 11 12 #include "TransformBox.h" 13 #include "TransformCommand.h" 14 15 16 namespace BPrivate { 17 namespace Icon { 18 struct control_point; 19 class Transformable; 20 class VectorPath; 21 } 22 } 23 using namespace BPrivate::Icon; 24 25 class TransformPointsCommand : public TransformCommand, 26 public TransformBoxListener { 27 public: 28 TransformPointsCommand( 29 TransformBox* box, 30 31 VectorPath* path, 32 const int32* indices, 33 const control_point* points, 34 int32 count, 35 36 BPoint pivot, 37 BPoint translation, 38 double rotation, 39 double xScale, 40 double yScale, 41 42 const char* name, 43 int32 nameIndex); 44 virtual ~TransformPointsCommand(); 45 46 // Command interface 47 virtual status_t InitCheck(); 48 49 // TransformBoxListener interface 50 virtual void TransformBoxDeleted( 51 const TransformBox* box); 52 protected: 53 // TransformCommand interface 54 virtual status_t _SetTransformation(BPoint pivotDiff, 55 BPoint translationDiff, 56 double rotationDiff, 57 double xScaleDiff, 58 double yScaleDiff) const; 59 60 TransformBox* fTransformBox; 61 62 VectorPath* fPath; 63 64 int32* fIndices; 65 control_point* fPoints; 66 int32 fCount; 67 }; 68 69 #endif // TRANSFORM_POINTS_COMMAND_H 70