mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:07:36 +00:00
PixelPaint: Allow selecting a custom aspect ratio for EllipseTool
If you enter a custom aspect ratio, and are not holding down shift, the bounding rect for the ellipse will be constrained to the entered aspect ratio
This commit is contained in:
parent
f14c891ba5
commit
6ba3fc559f
2 changed files with 38 additions and 1 deletions
|
@ -8,7 +8,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "Tool.h"
|
||||
#include <LibGUI/ActionGroup.h>
|
||||
#include <LibGUI/Forward.h>
|
||||
#include <LibGfx/Point.h>
|
||||
|
||||
namespace PixelPaint {
|
||||
|
@ -40,12 +40,16 @@ private:
|
|||
void draw_using(GUI::Painter&, Gfx::IntPoint const& start_position, Gfx::IntPoint const& end_position, int thickness);
|
||||
|
||||
RefPtr<GUI::Widget> m_properties_widget;
|
||||
RefPtr<GUI::TextBox> m_aspect_w_textbox;
|
||||
RefPtr<GUI::TextBox> m_aspect_h_textbox;
|
||||
|
||||
GUI::MouseButton m_drawing_button { GUI::MouseButton::None };
|
||||
Gfx::IntPoint m_ellipse_start_position;
|
||||
Gfx::IntPoint m_ellipse_end_position;
|
||||
int m_thickness { 1 };
|
||||
FillMode m_fill_mode { FillMode::Outline };
|
||||
DrawMode m_draw_mode { DrawMode::FromCorner };
|
||||
Optional<float> m_aspect_ratio;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue