1 /* 2 * Copyright 2006-2010, Stephan Aßmus <superstippi@gmx.de>. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef TRANSFORM_GRADIENT_COMMAND_H 6 #define TRANSFORM_GRADIENT_COMMAND_H 7 8 9 #include "IconBuild.h" 10 #include "TransformBox.h" 11 #include "TransformCommand.h" 12 13 14 _BEGIN_ICON_NAMESPACE 15 class Gradient; 16 _END_ICON_NAMESPACE 17 18 _USING_ICON_NAMESPACE 19 20 21 class TransformGradientCommand : public TransformCommand, 22 public TransformBoxListener { 23 public: 24 TransformGradientCommand( 25 TransformBox* box, Gradient* gradient, 26 BPoint pivot, BPoint translation, 27 double rotation, double xScale, 28 double yScale, const char* name, 29 int32 nameIndex); 30 virtual ~TransformGradientCommand(); 31 32 // Command interface 33 virtual status_t InitCheck(); 34 35 // TransformBoxListener interface 36 virtual void TransformBoxDeleted(const TransformBox* box); 37 38 protected: 39 // TransformCommand interface 40 virtual status_t _SetTransformation(BPoint pivotDiff, 41 BPoint translationDiff, 42 double rotationDiff, double xScaleDiff, 43 double yScaleDiff) const; 44 45 TransformBox* fTransformBox; 46 Gradient* fGradient; 47 }; 48 49 50 #endif // TRANSFORM_GRADIENT_COMMAND_H 51