Remove incomplete fill tool for next release
This commit is contained in:
parent
279a9317a4
commit
cdbeb838ab
7 changed files with 0 additions and 149 deletions
|
|
@ -87,7 +87,6 @@ set(sources "src/main.cpp"
|
|||
"src/DrawingProgram/Tools/EyeDropperTool.cpp"
|
||||
"src/DrawingProgram/Tools/ScreenshotTool.cpp"
|
||||
"src/DrawingProgram/Tools/EditTool.cpp"
|
||||
"src/DrawingProgram/Tools/FillTool.cpp"
|
||||
"src/DrawingProgram/Tools/ZoomCanvasTool.cpp"
|
||||
"src/DrawingProgram/Tools/PanCanvasTool.cpp"
|
||||
"src/DrawingProgram/Tools/GridModifyTool.cpp"
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M19.2277 18.7323L20.9955 16.9645L22.7632 18.7323C23.7395 19.7086 23.7395 21.2915 22.7632 22.2678C21.7869 23.2441 20.204 23.2441 19.2277 22.2678C18.2514 21.2915 18.2514 19.7086 19.2277 18.7323ZM8.87861 1.07971L20.1923 12.3934C20.5828 12.7839 20.5828 13.4171 20.1923 13.8076L11.707 22.2929C11.3165 22.6834 10.6833 22.6834 10.2928 22.2929L1.80754 13.8076C1.41702 13.4171 1.41702 12.7839 1.80754 12.3934L9.58572 4.61525L7.4644 2.49393L8.87861 1.07971ZM10.9999 6.02946L3.92886 13.1005L10.9999 20.1716L18.071 13.1005L10.9999 6.02946Z"></path></svg>
|
||||
|
Before Width: | Height: | Size: 631 B |
|
|
@ -400,7 +400,6 @@ void DrawingProgram::toolbar_gui(Toolbar& t) {
|
|||
|
||||
tool_button("Brush Toolbar Button", "data/icons/brush.svg", DrawingProgramToolType::BRUSH);
|
||||
tool_button("Eraser Toolbar Button", "data/icons/eraser.svg", DrawingProgramToolType::ERASER);
|
||||
tool_button("Fill Toolbar Button", "data/icons/RemixIcon/paint-line.svg", DrawingProgramToolType::FILL);
|
||||
tool_button("Line Toolbar Button", "data/icons/line.svg", DrawingProgramToolType::LINE);
|
||||
tool_button("Text Toolbar Button", "data/icons/text.svg", DrawingProgramToolType::TEXTBOX);
|
||||
tool_button("Ellipse Toolbar Button", "data/icons/circle.svg", DrawingProgramToolType::ELLIPSE);
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
|
||||
#include "BrushTool.hpp"
|
||||
#include "EraserTool.hpp"
|
||||
#include "FillTool.hpp"
|
||||
#include "PanCanvasTool.hpp"
|
||||
#include "RectSelectTool.hpp"
|
||||
#include "LassoSelectTool.hpp"
|
||||
|
|
@ -46,8 +45,6 @@ std::unique_ptr<DrawingProgramToolBase> DrawingProgramToolBase::allocate_tool_ty
|
|||
return std::make_unique<BrushTool>(drawP);
|
||||
case DrawingProgramToolType::ERASER:
|
||||
return std::make_unique<EraserTool>(drawP);
|
||||
case DrawingProgramToolType::FILL:
|
||||
return std::make_unique<FillTool>(drawP);
|
||||
case DrawingProgramToolType::LASSOSELECT:
|
||||
return std::make_unique<LassoSelectTool>(drawP);
|
||||
case DrawingProgramToolType::RECTSELECT:
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ class PhoneDrawingProgramScreen;
|
|||
enum class DrawingProgramToolType : int {
|
||||
BRUSH = 0,
|
||||
ERASER,
|
||||
FILL,
|
||||
LASSOSELECT,
|
||||
RECTSELECT,
|
||||
RECTANGLE,
|
||||
|
|
|
|||
|
|
@ -1,98 +0,0 @@
|
|||
/*
|
||||
* InfiniPaint
|
||||
* Copyright (C) 2025-2026 Yousef Khadadeh
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "FillTool.hpp"
|
||||
#include "../DrawingProgram.hpp"
|
||||
#include "../../MainProgram.hpp"
|
||||
#include "../../DrawData.hpp"
|
||||
#include "DrawingProgramToolBase.hpp"
|
||||
#include "../../CoordSpaceHelper.hpp"
|
||||
#include "../../GUIStuff/ElementHelpers/TextLabelHelpers.hpp"
|
||||
#include "../../CanvasComponents/MeshCanvasComponent.hpp"
|
||||
|
||||
FillTool::FillTool(DrawingProgram& initDrawP):
|
||||
DrawingProgramToolBase(initDrawP)
|
||||
{}
|
||||
|
||||
DrawingProgramToolType FillTool::get_type() {
|
||||
return DrawingProgramToolType::FILL;
|
||||
}
|
||||
|
||||
void FillTool::gui_toolbox(Toolbar& t) {
|
||||
auto& gui = drawP.world.main.g.gui;
|
||||
gui.new_id("fill tool", [&] {
|
||||
GUIStuff::ElementHelpers::text_label_centered(gui, "Fill");
|
||||
});
|
||||
}
|
||||
|
||||
void FillTool::gui_phone_toolbox(PhoneDrawingProgramScreen& t) {
|
||||
auto& gui = drawP.world.main.g.gui;
|
||||
gui.new_id("fill tool", [&] {
|
||||
});
|
||||
}
|
||||
|
||||
void FillTool::right_click_popup_gui(Toolbar& t, Vector2f popupPos) {
|
||||
drawP.selection_action_menu(popupPos);
|
||||
}
|
||||
|
||||
void FillTool::input_mouse_button_on_canvas_callback(const InputManager::MouseButtonCallbackArgs& button) {
|
||||
if(button.button == InputManager::MouseButton::LEFT) {
|
||||
if(button.down && drawP.layerMan.is_a_layer_being_edited() && !drawP.world.main.g.gui.cursor_obstructed()) {
|
||||
auto& toolConfig = drawP.world.main.toolConfig;
|
||||
|
||||
CanvasComponentContainer* newContainer = new CanvasComponentContainer(drawP.world.netObjMan, CanvasComponentType::MESH);
|
||||
MeshCanvasComponent& newMesh = static_cast<MeshCanvasComponent&>(newContainer->get_comp());
|
||||
|
||||
newMesh.d.color = toolConfig.globalConf.foregroundColor;
|
||||
//newMesh.d.points.contours.emplace_back();
|
||||
//newMesh.d.points.contours.back().emplace_back(button.pos + Vector2f{0.0f, 100.0f});
|
||||
//newMesh.d.points.contours.back().emplace_back(button.pos + Vector2f{-100.0f, -100.0f});
|
||||
//newMesh.d.points.contours.back().emplace_back(button.pos + Vector2f{100.0f, -100.0f});
|
||||
newContainer->coords = drawP.world.drawData.cam.c;
|
||||
|
||||
objInfoBeingEdited = drawP.layerMan.add_component_to_layer_being_edited(newContainer);
|
||||
|
||||
objInfoBeingEdited->obj->commit_update(drawP);
|
||||
objInfoBeingEdited->obj->send_comp_update(drawP, true);
|
||||
|
||||
drawP.layerMan.add_undo_place_component(objInfoBeingEdited);
|
||||
|
||||
objInfoBeingEdited = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vector4f* FillTool::color_picker_color(Vector4f* oldColor) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void FillTool::erase_component(CanvasComponentContainer::ObjInfo* erasedComp) {
|
||||
}
|
||||
|
||||
void FillTool::switch_tool(DrawingProgramToolType newTool) {
|
||||
}
|
||||
|
||||
void FillTool::tool_update() {
|
||||
}
|
||||
|
||||
bool FillTool::prevent_undo_or_redo() {
|
||||
return false;
|
||||
}
|
||||
|
||||
void FillTool::draw(SkCanvas* canvas, const DrawData& drawData) {
|
||||
}
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
/*
|
||||
* InfiniPaint
|
||||
* Copyright (C) 2025-2026 Yousef Khadadeh
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <include/core/SkCanvas.h>
|
||||
#include "../../DrawData.hpp"
|
||||
#include <Helpers/SCollision.hpp>
|
||||
#include "../../CoordSpaceHelper.hpp"
|
||||
#include "DrawingProgramToolBase.hpp"
|
||||
|
||||
class DrawingProgram;
|
||||
|
||||
class FillTool : public DrawingProgramToolBase {
|
||||
public:
|
||||
FillTool(DrawingProgram& initDrawP);
|
||||
virtual DrawingProgramToolType get_type() override;
|
||||
virtual void gui_toolbox(Toolbar& t) override;
|
||||
virtual void gui_phone_toolbox(PhoneDrawingProgramScreen& t) override;
|
||||
virtual void right_click_popup_gui(Toolbar& t, Vector2f popupPos) override;
|
||||
virtual void erase_component(CanvasComponentContainer::ObjInfo* erasedComp) override;
|
||||
virtual void tool_update() override;
|
||||
virtual void draw(SkCanvas* canvas, const DrawData& drawData) override;
|
||||
virtual void switch_tool(DrawingProgramToolType newTool) override;
|
||||
virtual bool prevent_undo_or_redo() override;
|
||||
virtual Vector4f* color_picker_color(Vector4f* oldColor) override;
|
||||
virtual void input_mouse_button_on_canvas_callback(const InputManager::MouseButtonCallbackArgs& button) override;
|
||||
private:
|
||||
CanvasComponentContainer::ObjInfo* objInfoBeingEdited = nullptr;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue