OmaPhoto 1.0.0: the Linux port of Compositor
Release / deb (push) Canceled after 0s
Release / rpm (push) Canceled after 0s
Release / arch (push) Canceled after 0s
Release / publish (push) Canceled after 0s

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:
雷电芽衣andClaude committed 2026-09-26 00:44:52 -04:00
commit c864304695
564 files changed
+100804

No files matched your search

+64
View File
@@ -0,0 +1,64 @@
#pragma once
#include "Document/BrushStroke.h"
#include "Document/LayerAppearance.h"
#include "Document/LayerTransform.h"
#include <QImage>
#include <QPainter>
#include <functional>
#include <memory>
#include <optional>
#include <vector>
class RasterSnapshot;
// Draws layers top-left, shared by the canvas and export.
namespace LayerRenderer {
struct Options {
double scale = 1;
double opacity = 1;
LayerBlendMode blendMode = LayerBlendMode::normal;
// A null image means no mask.
QImage mask = QImage();
// Folder masks as device-sized alpha coverage; null means none.
QImage clip = QImage();
};
// An image halved for a large reduction, and its overhang.
struct Reduced {
QImage image;
int level;
double widthScale;
double heightScale;
};
// Replacement tiles over a source, in a pixel grid.
struct BrushPreview {
std::vector<BrushPatch> patches;
int pixelWidth;
int pixelHeight;
// Patches are coverage the source shows through.
bool paintingMask;
// Where the source sits in the grid; absent means everywhere.
std::optional<QRectF> sourceRect = std::nullopt;
// A painted source, drawn from its tiles.
std::shared_ptr<const RasterSnapshot> raster = nullptr;
// Stands in for the raster's base when not null.
QImage rasterBase = QImage();
};
void draw(const QImage &image, const LayerTransform &transform, QPointF center, QPainter &context,
const Options &options = {});
// Fills white through a gray mask, as the painter blends.
void drawCoverage(const QImage &image, const LayerTransform &transform, QPainter &context);
// Previews tiles without a full-size raster; blends exactly once.
void drawBrushPreview(const QImage &image, const LayerTransform &transform, QPointF center, QPainter &context,
const Options &options, const BrushPreview &preview);
// Composes a layer aside, composites it once; `veil` repaints coverage.
void composite(QPainter &context, const QTransform &placement, const QRectF &extent, LayerSampling sampling,
InterpolationQuality quality, const Options &options, const QRectF &maskBounds,
const std::function<void(QPainter &)> &body, const std::function<void(QPainter &)> &veil = {});
InterpolationQuality interpolation(LayerSampling sampling, double finalFactor);
Reduced reduced(const QImage &image, double width, double device, LayerSampling sampling);
QRectF coverage(const Reduced &reduced, const QRectF &bounds);
double deviceScale(const QPainter &context);
}