KQuickImageEditor

resizecommand.cpp
1/* SPDX-FileCopyrightText: (C) 2020 Carl Schwan <carl@carlschwan.eu>
2 * SPDX-FileCopyrightText: 2021 Noah Davis <noahadvs@gmail.com>
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}
virtual QImage undo(QImage image) override
Revert a change to the document.
virtual QImage redo(QImage image) override
Applies the change to the document.
ResizeCommand(const QSize &resizeSize)
Contructor.
QImage scaled(const QSize &size, Qt::AspectRatioMode aspectRatioMode, Qt::TransformationMode transformMode) const const
IgnoreAspectRatio
SmoothTransformation
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:19:40 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.