The document's own pixel budget, marching ants at screen resolution (12.11a)
This commit is contained in:
1 parent
ffba1753c6
commit
8a9c56ee1f
75 files changed
+759
-189
No files matched your search
@@ -1,4 +1,5 @@
|
||||
#include "Document/BrushStroke.h"
|
||||
#include "Document/DocumentLimits.h"
|
||||
#include "Document/EditorSession.h"
|
||||
#include "Document/PixelAdjust.h"
|
||||
#include "Document/PixelInvert.h"
|
||||
@@ -11,7 +12,7 @@ namespace {
|
||||
// A uniform 1×1 mask given the layer's pixel grid.
|
||||
QImage expandedUniformMask(const QImage &image, int width, int height)
|
||||
{
|
||||
if (width <= 0 || height <= 0 || qint64(width) * height > 100'000'000)
|
||||
if (width <= 0 || height <= 0 || qint64(width) * height > DocumentLimits::maxSurfacePixels)
|
||||
throw ProjectError(ProjectError::Kind::tooLarge);
|
||||
QImage expanded = BrushRaster::context(width, height, true);
|
||||
QPainter painter(&expanded);
|
||||
|
||||
Reference in new issue
Block a user