mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:57:45 +00:00
PixelPaint: Add ability to fit to either width, height, or image
This commit is contained in:
parent
be697a440f
commit
9013d0fe38
2 changed files with 19 additions and 3 deletions
|
@ -54,9 +54,15 @@ public:
|
|||
|
||||
Layer* layer_at_editor_position(Gfx::IntPoint const&);
|
||||
|
||||
enum class FitType {
|
||||
Width,
|
||||
Height,
|
||||
Image
|
||||
};
|
||||
|
||||
float scale() const { return m_scale; }
|
||||
void scale_centered_on_position(Gfx::IntPoint const&, float);
|
||||
void fit_image_to_view();
|
||||
void fit_image_to_view(FitType type = FitType::Image);
|
||||
void reset_scale_and_position();
|
||||
void scale_by(float);
|
||||
void set_absolute_scale(float, bool do_relayout = true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue