File indexing completed on 2024-04-28 04:41:46

0001 /*
0002  * SPDX-FileCopyrightText: (C) 2020 Carl Schwan <carl@carlschwan.eu>
0003  *
0004  * SPDX-License-Identifier: LGPL-2.1-or-later
0005  */
0006 
0007 #pragma once
0008 
0009 #include "undocommand.h"
0010 
0011 #include <QImage>
0012 #include <QRect>
0013 
0014 /**
0015  * @brief MirrorCommand that mirror an image horizontally or vertically.
0016  */
0017 class MirrorCommand : public UndoCommand
0018 {
0019 public:
0020     MirrorCommand(bool horizontal, bool vertical);
0021     ~MirrorCommand() override = default;
0022 
0023     virtual QImage redo(QImage image) override;
0024 
0025     virtual QImage undo(QImage image) override;
0026 
0027 private:
0028     bool m_horizontal;
0029     bool m_vertical;
0030 };