KQuickImageEditor
7#include "cropcommand.h"
10 : m_cropRect(cropRect)
23 if (m_cropRect.x() < 0) {
24 m_cropRect.setWidth(m_cropRect.width() + m_cropRect.x());
27 if (m_cropRect.y() < 0) {
28 m_cropRect.setHeight(m_cropRect.height() + m_cropRect.y());
31 if (m_image.width() < m_cropRect.width() + m_cropRect.x()) {
32 m_cropRect.setWidth(m_image.width() - m_cropRect.x());
34 if (m_image.height() < m_cropRect.height() + m_cropRect.y()) {
35 m_cropRect.setHeight(m_image.height() - m_cropRect.y());
37 return m_image.
copy(m_cropRect);
QImage undo(QImage image) override
Revert a change to the document.
QImage redo(QImage image) override
Applies the change to the document.
CropCommand(const QRect &cropRect)
Contructor.
QImage copy(const QRect &rectangle) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:50:25 by
doxygen 1.13.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.