Update README.md, and add workaround to get SVG screenshots working again

This commit is contained in:
Yousef Khadadeh 2026-01-10 22:29:34 +03:00
parent e487731834
commit 1212780441
13 changed files with 18 additions and 5 deletions

View file

@ -35,6 +35,7 @@ This app was inspired by [Lorien](https://github.com/mbrlabs/Lorien), another gr
<img alt="Sketches Showcase" src="https://github.com/ErrorAtLine0/infinipaint/blob/main/docs/showcase/sketches.png?raw=true" width="100%"/> <img alt="Sketches Showcase" src="https://github.com/ErrorAtLine0/infinipaint/blob/main/docs/showcase/sketches.png?raw=true" width="100%"/>
<img alt="Online Collaboration Showcase" src="https://github.com/ErrorAtLine0/infinipaint/blob/main/docs/showcase/collaboration.png?raw=true" width="100%"/> <img alt="Online Collaboration Showcase" src="https://github.com/ErrorAtLine0/infinipaint/blob/main/docs/showcase/collaboration.png?raw=true" width="100%"/>
<img alt="Images Showcase" src="https://github.com/ErrorAtLine0/infinipaint/blob/main/docs/showcase/pictures.png?raw=true" width="100%"/> <img alt="Images Showcase" src="https://github.com/ErrorAtLine0/infinipaint/blob/main/docs/showcase/pictures.png?raw=true" width="100%"/>
<img alt="Layers Showcase" src="https://github.com/ErrorAtLine0/infinipaint/blob/main/docs/showcase/layers.png?raw=true" width="100%"/>
<img alt="Right Click Menu Showcase" src="https://github.com/ErrorAtLine0/infinipaint/blob/main/docs/showcase/rotate.png?raw=true" width="100%"/> <img alt="Right Click Menu Showcase" src="https://github.com/ErrorAtLine0/infinipaint/blob/main/docs/showcase/rotate.png?raw=true" width="100%"/>
<img alt="Bookmark Showcase" src="https://github.com/ErrorAtLine0/infinipaint/blob/main/docs/showcase/bookmarks.png?raw=true" width="100%"/> <img alt="Bookmark Showcase" src="https://github.com/ErrorAtLine0/infinipaint/blob/main/docs/showcase/bookmarks.png?raw=true" width="100%"/>
<img alt="Textbox Showcase" src="https://github.com/ErrorAtLine0/infinipaint/blob/main/docs/showcase/textbox.png?raw=true" width="100%"/> <img alt="Textbox Showcase" src="https://github.com/ErrorAtLine0/infinipaint/blob/main/docs/showcase/textbox.png?raw=true" width="100%"/>
@ -49,6 +50,7 @@ This app was inspired by [Lorien](https://github.com/mbrlabs/Lorien), another gr
- See other members draw in real time - See other members draw in real time
- Although this is a feature, this app can also be used offline - Although this is a feature, this app can also be used offline
- Graphics tablet support (Pressure sensitive brush and eraser detection) - Graphics tablet support (Pressure sensitive brush and eraser detection)
- Layers with blend modes
- Saveable color palettes - Saveable color palettes
- Quick menu usable by right clicking on the canvas, which can be used to: - Quick menu usable by right clicking on the canvas, which can be used to:
- Quickly change brush colors using the currently selected color palette - Quickly change brush colors using the currently selected color palette
@ -66,7 +68,7 @@ This app was inspired by [Lorien](https://github.com/mbrlabs/Lorien), another gr
- Place infinite square grids on the canvas as guides for drawing - Place infinite square grids on the canvas as guides for drawing
- Grids come with various properties, including changing color, and displaying coordinate axes. - Grids come with various properties, including changing color, and displaying coordinate axes.
- Textbox tool with formatting support (Bold, italics, underline, strikethrough, overline, fonts, text color, highlight color, text size, paragraph alignment, text direction) - Textbox tool with formatting support (Bold, italics, underline, strikethrough, overline, fonts, text color, highlight color, text size, paragraph alignment, text direction)
- Other tools: Rectangle, Circle, Eye dropper/color picker, Edit/cursor - Other tools: Rectangle, Ellipse, Line, Eye dropper/color picker, Edit/cursor
- Can copy/paste selected objects (Ctrl-C Ctrl-V). This can also be done between different files, as long as they're open in different tabs in the same window. - Can copy/paste selected objects (Ctrl-C Ctrl-V). This can also be done between different files, as long as they're open in different tabs in the same window.
- Any file can be placed on the canvas. Using the edit tool, you can download any file/image on the canvas to your computer. This can be used as a sort of file sharing mechanism in a collaborative canvas (should probably only use this for small files...) - Any file can be placed on the canvas. Using the edit tool, you can download any file/image on the canvas to your computer. This can be used as a sort of file sharing mechanism in a collaborative canvas (should probably only use this for small files...)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 196 KiB

After

Width:  |  Height:  |  Size: 228 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 KiB

After

Width:  |  Height:  |  Size: 185 KiB

Before After
Before After

BIN
docs/showcase/layers.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

After

Width:  |  Height:  |  Size: 1.8 MiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 209 KiB

After

Width:  |  Height:  |  Size: 235 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 555 KiB

After

Width:  |  Height:  |  Size: 620 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 114 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 203 KiB

After

Width:  |  Height:  |  Size: 221 KiB

Before After
Before After

View file

@ -44,14 +44,14 @@
<li>Infinite canvas, with infinite zoom</li> <li>Infinite canvas, with infinite zoom</li>
<li>Open online lobbies for collaboration</li> <li>Open online lobbies for collaboration</li>
<li>Graphics tablet support (Pressure sensitive brush and eraser detection)</li> <li>Graphics tablet support (Pressure sensitive brush and eraser detection)</li>
<li>Layers and blending modes</li> <li>Layers with blend modes</li>
<li>Saveable color palettes</li> <li>Saveable color palettes</li>
<li>Right click to open a quick menu</li> <li>Right click to open a quick menu</li>
<li>Place bookmarks on the canvas to jump to later</li> <li>Place bookmarks on the canvas to jump to later</li>
<li>Undo/Redo</li> <li>Undo/Redo</li>
<li>Screenshot to export parts of the canvas to a picture (can export to raster formats or SVG)</li> <li>Screenshot to export parts of the canvas to a picture (can export to raster formats or SVG)</li>
<li>Place text boxes with formatting</li> <li>Place text boxes with formatting</li>
<li>Other tools such as: Rectangle select tool, Lasso select tool, Color picker tool, Grid tool, Square and Ellipse tools, line tool</li> <li>Other tools such as: Rectangle select tool, Lasso select tool, Color picker tool, Grid tool, Rectangle tool, Ellipse tool, Line tool</li>
<li>Copy and paste objects on the canvas, and between different canvases</li> <li>Copy and paste objects on the canvas, and between different canvases</li>
<li>Insert images and files on the canvas</li> <li>Insert images and files on the canvas</li>
</ul> </ul>

View file

@ -12,6 +12,7 @@ struct DrawData {
DrawCamera cam; DrawCamera cam;
ResourceManager* rMan; ResourceManager* rMan;
MainProgram* main; MainProgram* main;
bool onlyRenderLayerBeingEdited = false;
bool dontUseDrawProgCache = false; bool dontUseDrawProgCache = false;
bool clampDrawBetween = true; bool clampDrawBetween = true;
bool drawGrids = true; bool drawGrids = true;

View file

@ -61,8 +61,14 @@ CanvasComponentContainer::ObjInfoIterator DrawingProgramLayerManager::get_edited
} }
void DrawingProgramLayerManager::draw(SkCanvas* canvas, const DrawData& drawData) { void DrawingProgramLayerManager::draw(SkCanvas* canvas, const DrawData& drawData) {
if(layerTreeRoot) if(layerTreeRoot) {
layerTreeRoot->draw(canvas, drawData); if(drawData.onlyRenderLayerBeingEdited) {
if(is_a_layer_being_edited())
editingLayer.lock()->get_layer().draw(canvas, drawData);
}
else
layerTreeRoot->draw(canvas, drawData);
}
} }
std::vector<CanvasComponentContainer::ObjInfo*> DrawingProgramLayerManager::get_flattened_component_list() const { std::vector<CanvasComponentContainer::ObjInfo*> DrawingProgramLayerManager::get_flattened_component_list() const {

View file

@ -63,6 +63,8 @@ void ScreenshotTool::gui_toolbox() {
}); });
if(controls.selectedType != SCREENSHOT_SVG) if(controls.selectedType != SCREENSHOT_SVG)
t.gui.checkbox_field("Display Grid", "Display Grid", &controls.displayGrid); t.gui.checkbox_field("Display Grid", "Display Grid", &controls.displayGrid);
else
t.gui.text_label("Note: Screenshot will only capture\nlayer currently being edited");
if(controls.selectedType != 0) if(controls.selectedType != 0)
t.gui.checkbox_field("Transparent Background", "Transparent Background", &controls.transparentBackground); t.gui.checkbox_field("Transparent Background", "Transparent Background", &controls.transparentBackground);
if(controls.imageSize.x() != oldImgSize.x()) { if(controls.imageSize.x() != oldImgSize.x()) {
@ -273,8 +275,10 @@ void ScreenshotTool::take_screenshot_svg(SkCanvas* canvas, bool transparentBackg
drawP.world.main.transparentBackground = transparentBackground; drawP.world.main.transparentBackground = transparentBackground;
drawP.world.drawData.drawGrids = false; drawP.world.drawData.drawGrids = false;
drawP.world.drawData.dontUseDrawProgCache = true; drawP.world.drawData.dontUseDrawProgCache = true;
drawP.world.drawData.onlyRenderLayerBeingEdited = true;
drawP.world.main.draw(canvas); drawP.world.main.draw(canvas);
drawP.world.drawData.onlyRenderLayerBeingEdited = false;
drawP.world.main.takingScreenshot = false; drawP.world.main.takingScreenshot = false;
drawP.world.main.transparentBackground = false; drawP.world.main.transparentBackground = false;
drawP.world.drawData.drawGrids = oldDrawGrids; drawP.world.drawData.drawGrids = oldDrawGrids;