OmaPhoto 1.0.0: the Linux port of Compositor
A layered image editor for Linux and Omarchy, ported from Compositor (github.com/robbietilton/Compositor), whose Swift source is its specification. It reads and writes Compositor's .comp projects. Packages for Ubuntu, Fedora and Arch come from the release workflow; scripts/install/ holds one install script per distribution family, and flake.nix serves NixOS. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
commit
c864304695
564 files changed
+100804
No files matched your search
@@ -0,0 +1,45 @@
|
||||
#pragma once
|
||||
#include <QPointF>
|
||||
#include <QString>
|
||||
#include <QtGlobal>
|
||||
#include <optional>
|
||||
|
||||
enum class CanvasUnit { pixels, percent, inches, centimeters };
|
||||
// The name users see.
|
||||
QString rawValue(CanvasUnit unit);
|
||||
|
||||
// What the canvas size sheet edits, in final pixels.
|
||||
struct CanvasSizeDraft {
|
||||
CanvasSizeDraft(qint64 width, qint64 height, double resolution);
|
||||
|
||||
qint64 originalWidth;
|
||||
qint64 originalHeight;
|
||||
double resolution;
|
||||
double width;
|
||||
double height;
|
||||
bool relative = false;
|
||||
bool locked = false;
|
||||
CanvasUnit unit = CanvasUnit::pixels;
|
||||
|
||||
bool valid() const;
|
||||
double displayed(bool widthAxis) const;
|
||||
void set(double value, bool widthAxis);
|
||||
};
|
||||
|
||||
struct CanvasExtensionColor {
|
||||
double red;
|
||||
double green;
|
||||
double blue;
|
||||
};
|
||||
|
||||
struct CanvasSizeOptions {
|
||||
qint64 width;
|
||||
qint64 height;
|
||||
// Row-major, top-left through bottom-right.
|
||||
qint64 anchor = 4;
|
||||
std::optional<CanvasExtensionColor> fill = std::nullopt;
|
||||
// Crop supplies its own translation of the content.
|
||||
std::optional<QPointF> contentOffset = std::nullopt;
|
||||
|
||||
QPointF offset(qint64 fromWidth, qint64 oldHeight) const;
|
||||
};
|
||||
Reference in new issue
Block a user