KQuickImageEditor

resizecommand.cpp
1 /* SPDX-FileCopyrightText: (C) 2020 Carl Schwan <[email protected]>
2  * SPDX-FileCopyrightText: 2021 Noah Davis <[email protected]>
3  * SPDX-License-Identifier: LGPL-2.1-or-later
4  */
5 
6 #include "resizecommand.h"
7 
9  : m_resizeSize(resizeSize)
10 {
11 }
12 
14 {
15  Q_UNUSED(image)
16  return m_image;
17 }
18 
20 {
21  m_image = image;
22  return m_image.scaled(m_resizeSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
23 }
ResizeCommand(const QSize &resizeSize)
Contructor.
IgnoreAspectRatio
virtual QImage redo(QImage image) override
Applies the change to the document.
virtual QImage undo(QImage image) override
Revert a change to the document.
SmoothTransformation
QImage scaled(int width, int height, Qt::AspectRatioMode aspectRatioMode, Qt::TransformationMode transformMode) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Oct 18 2021 23:08:19 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.