diff --git a/README.md b/README.md index ca3fb29..e123fca 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ This app was inspired by [Lorien](https://github.com/mbrlabs/Lorien), another gr Sketches Showcase Online Collaboration Showcase Images Showcase +Layers Showcase Right Click Menu Showcase Bookmark Showcase Textbox Showcase @@ -49,6 +50,7 @@ This app was inspired by [Lorien](https://github.com/mbrlabs/Lorien), another gr - See other members draw in real time - Although this is a feature, this app can also be used offline - Graphics tablet support (Pressure sensitive brush and eraser detection) +- Layers with blend modes - Saveable color palettes - Quick menu usable by right clicking on the canvas, which can be used to: - 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 - 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) -- 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. - 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...) diff --git a/docs/showcase/bookmarks.png b/docs/showcase/bookmarks.png index 8cdd01e..3b47d42 100644 Binary files a/docs/showcase/bookmarks.png and b/docs/showcase/bookmarks.png differ diff --git a/docs/showcase/collaboration.png b/docs/showcase/collaboration.png index c6c1f61..7c8092f 100644 Binary files a/docs/showcase/collaboration.png and b/docs/showcase/collaboration.png differ diff --git a/docs/showcase/layers.png b/docs/showcase/layers.png new file mode 100644 index 0000000..3488b8b Binary files /dev/null and b/docs/showcase/layers.png differ diff --git a/docs/showcase/pictures.png b/docs/showcase/pictures.png index 91eccc4..1d0be35 100644 Binary files a/docs/showcase/pictures.png and b/docs/showcase/pictures.png differ diff --git a/docs/showcase/rotate.png b/docs/showcase/rotate.png index 76a67c5..b90b0f6 100644 Binary files a/docs/showcase/rotate.png and b/docs/showcase/rotate.png differ diff --git a/docs/showcase/sketches.png b/docs/showcase/sketches.png index b87ea45..d7034f8 100644 Binary files a/docs/showcase/sketches.png and b/docs/showcase/sketches.png differ diff --git a/docs/showcase/textbox.png b/docs/showcase/textbox.png index 6245c2c..300ff08 100644 Binary files a/docs/showcase/textbox.png and b/docs/showcase/textbox.png differ diff --git a/docs/showcase/zoomforever.png b/docs/showcase/zoomforever.png index e72c341..d311ce8 100644 Binary files a/docs/showcase/zoomforever.png and b/docs/showcase/zoomforever.png differ diff --git a/linuxinstall/com.infinipaint.infinipaint.metainfo.xml b/linuxinstall/com.infinipaint.infinipaint.metainfo.xml index 888822a..094fb85 100644 --- a/linuxinstall/com.infinipaint.infinipaint.metainfo.xml +++ b/linuxinstall/com.infinipaint.infinipaint.metainfo.xml @@ -44,14 +44,14 @@
  • Infinite canvas, with infinite zoom
  • Open online lobbies for collaboration
  • Graphics tablet support (Pressure sensitive brush and eraser detection)
  • -
  • Layers and blending modes
  • +
  • Layers with blend modes
  • Saveable color palettes
  • Right click to open a quick menu
  • Place bookmarks on the canvas to jump to later
  • Undo/Redo
  • Screenshot to export parts of the canvas to a picture (can export to raster formats or SVG)
  • Place text boxes with formatting
  • -
  • Other tools such as: Rectangle select tool, Lasso select tool, Color picker tool, Grid tool, Square and Ellipse tools, line tool
  • +
  • Other tools such as: Rectangle select tool, Lasso select tool, Color picker tool, Grid tool, Rectangle tool, Ellipse tool, Line tool
  • Copy and paste objects on the canvas, and between different canvases
  • Insert images and files on the canvas
  • diff --git a/src/DrawData.hpp b/src/DrawData.hpp index b72b186..a9b85c8 100644 --- a/src/DrawData.hpp +++ b/src/DrawData.hpp @@ -12,6 +12,7 @@ struct DrawData { DrawCamera cam; ResourceManager* rMan; MainProgram* main; + bool onlyRenderLayerBeingEdited = false; bool dontUseDrawProgCache = false; bool clampDrawBetween = true; bool drawGrids = true; diff --git a/src/DrawingProgram/Layers/DrawingProgramLayerManager.cpp b/src/DrawingProgram/Layers/DrawingProgramLayerManager.cpp index c96b048..2d931d0 100644 --- a/src/DrawingProgram/Layers/DrawingProgramLayerManager.cpp +++ b/src/DrawingProgram/Layers/DrawingProgramLayerManager.cpp @@ -61,8 +61,14 @@ CanvasComponentContainer::ObjInfoIterator DrawingProgramLayerManager::get_edited } void DrawingProgramLayerManager::draw(SkCanvas* canvas, const DrawData& drawData) { - if(layerTreeRoot) - layerTreeRoot->draw(canvas, drawData); + if(layerTreeRoot) { + if(drawData.onlyRenderLayerBeingEdited) { + if(is_a_layer_being_edited()) + editingLayer.lock()->get_layer().draw(canvas, drawData); + } + else + layerTreeRoot->draw(canvas, drawData); + } } std::vector DrawingProgramLayerManager::get_flattened_component_list() const { diff --git a/src/DrawingProgram/Tools/ScreenshotTool.cpp b/src/DrawingProgram/Tools/ScreenshotTool.cpp index ddac6c5..35a88fe 100644 --- a/src/DrawingProgram/Tools/ScreenshotTool.cpp +++ b/src/DrawingProgram/Tools/ScreenshotTool.cpp @@ -63,6 +63,8 @@ void ScreenshotTool::gui_toolbox() { }); if(controls.selectedType != SCREENSHOT_SVG) 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) t.gui.checkbox_field("Transparent Background", "Transparent Background", &controls.transparentBackground); 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.drawData.drawGrids = false; drawP.world.drawData.dontUseDrawProgCache = true; + drawP.world.drawData.onlyRenderLayerBeingEdited = true; drawP.world.main.draw(canvas); + drawP.world.drawData.onlyRenderLayerBeingEdited = false; drawP.world.main.takingScreenshot = false; drawP.world.main.transparentBackground = false; drawP.world.drawData.drawGrids = oldDrawGrids;