tdesktop/Telegram/SourceFiles/editor/photo_editor_common.h

36 lines
704 B
C
Raw Normal View History

/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
#include <QGraphicsScene>
namespace Editor {
enum class PhotoEditorMode {
Transform,
Paint,
};
struct PhotoModifications {
int angle = 0;
bool flipped = false;
QRect crop;
std::shared_ptr<QGraphicsScene> paint = nullptr;
2021-02-08 03:13:40 +00:00
[[nodiscard]] bool empty() const;
[[nodiscard]] explicit operator bool() const;
~PhotoModifications();
2021-02-08 03:13:40 +00:00
};
2021-02-08 03:13:40 +00:00
[[nodiscard]] QImage ImageModified(
QImage image,
const PhotoModifications &mods);
} // namespace Editor