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
commit 9013d0fe38
Notes: sideshowbarker 2024-07-18 00:52:02 +09:00
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);