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 <Catalog.h> 14#include <Locale.h> 15 16#include "VectorPath.h" 17 18 19#undef B_TRANSLATION_CONTEXT 20#define B_TRANSLATION_CONTEXT "Icon-O-Matic-ReversePathCmd" 21 22 23// constructor 24ReversePathCommand::ReversePathCommand(VectorPath* path) 25 : PathCommand(path) 26{ 27} 28 29// destructor 30ReversePathCommand::~ReversePathCommand() 31{ 32} 33 34// Perform 35status_t 36ReversePathCommand::Perform() 37{ 38 fPath->Reverse(); 39 40 return B_OK; 41} 42 43// Undo 44status_t 45ReversePathCommand::Undo() 46{ 47 return Perform(); 48} 49 50// GetName 51void 52ReversePathCommand::GetName(BString& name) 53{ 54 name << B_TRANSLATE("Reverse Path"); 55} 56