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 14 15 namespace BPrivate { 16 namespace Icon { 17 class Shape; 18 class Transformable; 19 } 20 } 21 using namespace BPrivate::Icon; 22 23 class FreezeTransformationCommand : public Command { 24 public: 25 FreezeTransformationCommand( 26 Shape** const shapes, 27 int32 count); 28 virtual ~FreezeTransformationCommand(); 29 30 virtual status_t InitCheck(); 31 32 virtual status_t Perform(); 33 virtual status_t Undo(); 34 35 virtual void GetName(BString& name); 36 37 private: 38 void _ApplyTransformation(Shape* shape, 39 const Transformable& transform); 40 41 Shape** fShapes; 42 double* fOriginalTransformations; 43 int32 fCount; 44 }; 45 46 #endif // FREEZE_TRANSFORMATION_COMMAND_H 47