1
Fork 0
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:
Ben Wiederhake 2021-11-22 00:33:55 +01:00 committed by Andreas Kling
parent be697a440f
commit 9013d0fe38
2 changed files with 19 additions and 3 deletions

View file

@ -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);