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 Name=InfiniPaint
Comment=Infinite canvas program Comment=Infinite canvas program
Categories=Graphics;VectorGraphics; 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 Icon=com.infinipaint.infinipaint
Exec=infinipaint %F Exec=infinipaint %F

View file

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

View file

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