xref: /haiku/src/apps/icon-o-matic/shape/commands/TransformPointsCommand.h (revision cbe0a0c436162d78cc3f92a305b64918c839d079)
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 "IconBuild.h"
13 #include "TransformBox.h"
14 #include "TransformCommand.h"
15 
16 
17 _BEGIN_ICON_NAMESPACE
18 	struct control_point;
19 	class Transformable;
20 	class VectorPath;
21 _END_ICON_NAMESPACE
22 
23 _USING_ICON_NAMESPACE
24 
25 
26 class TransformPointsCommand : public TransformCommand,
27 							   public TransformBoxListener {
28  public:
29 								TransformPointsCommand(
30 										TransformBox* box,
31 
32 										VectorPath* path,
33 										const int32* indices,
34 										const control_point* points,
35 										int32 count,
36 
37 										BPoint pivot,
38 										BPoint translation,
39 										double rotation,
40 										double xScale,
41 										double yScale,
42 
43 										const char* name,
44 										int32 nameIndex);
45 	virtual						~TransformPointsCommand();
46 
47 	// Command interface
48 	virtual	status_t			InitCheck();
49 
50 	// TransformBoxListener interface
51 	virtual	void				TransformBoxDeleted(
52 									const TransformBox* box);
53  protected:
54  	// TransformCommand interface
55 	virtual	status_t			_SetTransformation(BPoint pivotDiff,
56 												   BPoint translationDiff,
57 												   double rotationDiff,
58 												   double xScaleDiff,
59 												   double yScaleDiff) const;
60 
61 			TransformBox*		fTransformBox;
62 
63 			VectorPath*			fPath;
64 
65 			int32*				fIndices;
66 			control_point*		fPoints;
67 			int32				fCount;
68 };
69 
70 #endif // TRANSFORM_POINTS_COMMAND_H
71