1 /* 2 * Copyright 2006-2007, Haiku. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Stephan Aßmus <superstippi@gmx.de> 7 */ 8 #ifndef FREEZE_TRANSFORMATION_COMMAND_H 9 #define FREEZE_TRANSFORMATION_COMMAND_H 10 11 12 #include "Command.h" 13 #include "IconBuild.h" 14 15 16 _BEGIN_ICON_NAMESPACE 17 class Shape; 18 class Transformable; 19 _END_ICON_NAMESPACE 20 21 _USING_ICON_NAMESPACE 22 23 24 class FreezeTransformationCommand : public Command { 25 public: 26 FreezeTransformationCommand( 27 Shape** const shapes, 28 int32 count); 29 virtual ~FreezeTransformationCommand(); 30 31 virtual status_t InitCheck(); 32 33 virtual status_t Perform(); 34 virtual status_t Undo(); 35 36 virtual void GetName(BString& name); 37 38 private: 39 void _ApplyTransformation(Shape* shape, 40 const Transformable& transform); 41 42 Shape** fShapes; 43 double* fOriginalTransformations; 44 int32 fCount; 45 }; 46 47 #endif // FREEZE_TRANSFORMATION_COMMAND_H 48