|
@@ -6,6 +6,7 @@
|
|
|
|
|
|
#pragma once
|
|
#pragma once
|
|
|
|
|
|
|
|
+#include "Guide.h"
|
|
#include "Image.h"
|
|
#include "Image.h"
|
|
#include "Selection.h"
|
|
#include "Selection.h"
|
|
#include <LibGUI/Frame.h>
|
|
#include <LibGUI/Frame.h>
|
|
@@ -38,6 +39,12 @@ public:
|
|
bool undo();
|
|
bool undo();
|
|
bool redo();
|
|
bool redo();
|
|
|
|
|
|
|
|
+ void add_guide(NonnullRefPtr<Guide> guide) { m_guides.append(guide); }
|
|
|
|
+ void remove_guide(Guide const& guide)
|
|
|
|
+ {
|
|
|
|
+ m_guides.remove_first_matching([&](auto& entry) { return &guide == entry.ptr(); });
|
|
|
|
+ }
|
|
|
|
+
|
|
void layers_did_change();
|
|
void layers_did_change();
|
|
|
|
|
|
Layer* layer_at_editor_position(Gfx::IntPoint const&);
|
|
Layer* layer_at_editor_position(Gfx::IntPoint const&);
|
|
@@ -77,6 +84,8 @@ public:
|
|
Gfx::FloatPoint image_position_to_editor_position(Gfx::IntPoint const&) const;
|
|
Gfx::FloatPoint image_position_to_editor_position(Gfx::IntPoint const&) const;
|
|
Gfx::FloatPoint editor_position_to_image_position(Gfx::IntPoint const&) const;
|
|
Gfx::FloatPoint editor_position_to_image_position(Gfx::IntPoint const&) const;
|
|
|
|
|
|
|
|
+ NonnullRefPtrVector<Guide> const& guides() const { return m_guides; }
|
|
|
|
+
|
|
private:
|
|
private:
|
|
explicit ImageEditor(NonnullRefPtr<Image>);
|
|
explicit ImageEditor(NonnullRefPtr<Image>);
|
|
|
|
|
|
@@ -106,6 +115,8 @@ private:
|
|
RefPtr<Layer> m_active_layer;
|
|
RefPtr<Layer> m_active_layer;
|
|
OwnPtr<GUI::UndoStack> m_undo_stack;
|
|
OwnPtr<GUI::UndoStack> m_undo_stack;
|
|
|
|
|
|
|
|
+ NonnullRefPtrVector<Guide> m_guides;
|
|
|
|
+
|
|
Tool* m_active_tool { nullptr };
|
|
Tool* m_active_tool { nullptr };
|
|
|
|
|
|
Color m_primary_color { Color::Black };
|
|
Color m_primary_color { Color::Black };
|