Warning, file /libraries/kquickimageeditor/src/code/commands/mirrorcommand.cpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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 "mirrorcommand.h"
0008 
0009 MirrorCommand::MirrorCommand(bool horizontal, bool vertical)
0010     : m_horizontal(horizontal)
0011     , m_vertical(vertical)
0012 {
0013 }
0014 
0015 QImage MirrorCommand::undo(QImage image)
0016 {
0017     return image.mirrored(m_horizontal, m_vertical);
0018 }
0019 
0020 QImage MirrorCommand::redo(QImage image)
0021 {
0022     return image.mirrored(m_horizontal, m_vertical);
0023 }