File indexing completed on 2024-09-29 04:13:50
0001 /* 0002 * SPDX-FileCopyrightText: (C) 2020 Carl Schwan <carl@carlschwan.eu> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.1-or-later 0005 */ 0006 0007 #include "rotatecommand.h" 0008 #include <QDebug> 0009 0010 RotateCommand::RotateCommand(const QTransform &tranform) 0011 : m_tranform(tranform) 0012 { 0013 } 0014 0015 QImage RotateCommand::undo(QImage image) 0016 { 0017 return image.transformed(m_tranform.rotate(180)); 0018 } 0019 0020 QImage RotateCommand::redo(QImage image) 0021 { 0022 return image.transformed(m_tranform); 0023 }