22 lines
438 B
C++
22 lines
438 B
C++
#pragma once
|
|
|
|
#include <QObject>
|
|
#include <QImage>
|
|
|
|
|
|
class ImageJsObject : public QObject {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit ImageJsObject(const QString& path);
|
|
|
|
Q_INVOKABLE std::size_t getWidth();
|
|
Q_INVOKABLE std::size_t getHeight();
|
|
Q_INVOKABLE QSize getSize();
|
|
|
|
// TODO(Faraphel): implement copy / paste, fill, shapes, mirror, resize, expand, shrink, crop, map...
|
|
|
|
private:
|
|
std::unique_ptr<QImage> _internal;
|
|
};
|
|
|