Say why a brush cannot paint; paint at the layer's own resolution; Cancel and Apply only when an edit waits, scaled layers' scale (13.11)

This commit is contained in:
ZacharyZhang-NY committed 2026-10-01 17:48:38 -04:00
1 parent 51e373af4c
commit cc9bf95722
24 files changed
+820 -129

No files matched your search

+6
View File
@@ -10,6 +10,12 @@ inline BrushSettings brush(double diameter, double hardness, double red, double
return BrushSettings{.diameter = diameter, .hardness = hardness, .red = red, .green = green, .blue = blue, .opacity = opacity};
}
// A document-pixel clone, copied from `offset` away.
inline BrushStroke::Clone documentClone(const QImage &image, QSizeF offset = QSizeF(0, 0))
{
return {image, QRectF(-offset.width(), -offset.height(), image.width(), image.height()), false};
}
inline ImageLayer blankLayer(int width, int height)
{
return ImageLayer(QStringLiteral("Layer 1"), QSizeF(width, height));