File indexing completed on 2024-10-13 04:15:11
0001 /* SPDX-FileCopyrightText: (C) 2020 Carl Schwan <carl@carlschwan.eu> 0002 * SPDX-FileCopyrightText: 2021 Noah Davis <noahadvs@gmail.com> 0003 * SPDX-License-Identifier: LGPL-2.1-or-later 0004 */ 0005 0006 #include "resizecommand.h" 0007 0008 ResizeCommand::ResizeCommand(const QSize &resizeSize) 0009 : m_resizeSize(resizeSize) 0010 { 0011 } 0012 0013 QImage ResizeCommand::undo(QImage image) 0014 { 0015 Q_UNUSED(image) 0016 return m_image; 0017 } 0018 0019 QImage ResizeCommand::redo(QImage image) 0020 { 0021 m_image = image; 0022 return m_image.scaled(m_resizeSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); 0023 }