Added flatpak rebrand info, and simplify brush stroke geometry to increase performance

This commit is contained in:
Yousef Khadadeh 2025-08-25 20:31:18 +03:00
parent ebf112d19a
commit 8c17eeb507
3 changed files with 14 additions and 6 deletions

View file

@ -5,7 +5,7 @@ Type=Application
Name=InfiniPaint
Comment=Infinite canvas program
Categories=Graphics;VectorGraphics;
Keywords=whiteboard;notes;drawing;draw;paint;painting;infinite;canvas;graphics;zoom
Keywords=paint;whiteboard;notes;drawing;draw;paint;painting;infinite;canvas;graphics;zoom
Icon=com.infinipaint.infinipaint
Exec=infinipaint %F

View file

@ -8,8 +8,8 @@
<project_license>MIT</project_license>
<branding>
<color type="primary" scheme_preference="light">#b6dbff</color>
<color type="primary" scheme_preference="dark">#002c58</color>
<color type="primary" scheme_preference="light">#8ff7ea</color>
<color type="primary" scheme_preference="dark">#325652</color>
</branding>
<url type="homepage">https://infinipaint.com</url>

View file

@ -8,6 +8,7 @@
#include "Helpers/MathExtras.hpp"
#include "../TimePoint.hpp"
#include <include/core/SkVertices.h>
#include <include/pathops/SkPathOps.h>
#include "../DrawCollision.hpp"
#endif
@ -211,8 +212,12 @@ void DrawBrushStroke::create_triangles(const std::function<bool(Vector2f, Vector
}
if(pointsN.size() < 2) {
if(bPath && !topPoints.empty())
bPath->addPoly(topPoints.data(), topPoints.size(), false);
if(bPath && !topPoints.empty()) {
SkPath newPath;
newPath.addPoly(topPoints.data(), topPoints.size(), false);
if(!Simplify(newPath, bPath.get()))
*bPath = newPath;
}
return;
}
@ -360,7 +365,10 @@ void DrawBrushStroke::create_triangles(const std::function<bool(Vector2f, Vector
if(bPath && !topPoints.empty()) {
topPoints.insert(topPoints.begin(), bottomPoints.rbegin(), bottomPoints.rend());
bPath->addPoly(topPoints.data(), topPoints.size(), true);
SkPath newPath;
newPath.addPoly(topPoints.data(), topPoints.size(), true);
if(!Simplify(newPath, bPath.get()))
*bPath = newPath;
}
}