xref: /haiku/src/apps/icon-o-matic/shape/commands/ReversePathCommand.cpp (revision 16d5c24e533eb14b7b8a99ee9f3ec9ba66335b1e)
1 /*
2  * Copyright 2006, 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 
9 #include "ReversePathCommand.h"
10 
11 #include <stdio.h>
12 
13 #include "VectorPath.h"
14 
15 // constructor
16 ReversePathCommand::ReversePathCommand(VectorPath* path)
17 	: PathCommand(path)
18 {
19 }
20 
21 // destructor
22 ReversePathCommand::~ReversePathCommand()
23 {
24 }
25 
26 // Perform
27 status_t
28 ReversePathCommand::Perform()
29 {
30 	fPath->Reverse();
31 
32 	return B_OK;
33 }
34 
35 // Undo
36 status_t
37 ReversePathCommand::Undo()
38 {
39 	return Perform();
40 }
41 
42 // GetName
43 void
44 ReversePathCommand::GetName(BString& name)
45 {
46 	name <<"Reverse Path";
47 }
48