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
26class 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	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