mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 20:57:35 +00:00
PixelPaint: Add Image>Resize Image... dialog. (Front end)
This commit is contained in:
parent
abaecb878b
commit
02399d4775
11 changed files with 302 additions and 0 deletions
29
Userland/Applications/PixelPaint/ResizeImageDialog.h
Normal file
29
Userland/Applications/PixelPaint/ResizeImageDialog.h
Normal file
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Andrew Smith <andrew@alsmith.net>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibGUI/Dialog.h>
|
||||
#include <LibGfx/Painter.h>
|
||||
|
||||
namespace PixelPaint {
|
||||
|
||||
class ResizeImageDialog final : public GUI::Dialog {
|
||||
C_OBJECT(ResizeImageDialog);
|
||||
|
||||
public:
|
||||
Gfx::IntSize const& desired_size() const { return m_desired_size; }
|
||||
Gfx::Painter::ScalingMode scaling_mode() const { return m_scaling_mode; }
|
||||
|
||||
private:
|
||||
ResizeImageDialog(Gfx::IntSize const& starting_size, GUI::Window* parent_window);
|
||||
|
||||
Gfx::IntSize m_desired_size;
|
||||
Gfx::Painter::ScalingMode m_scaling_mode;
|
||||
float m_starting_aspect_ratio;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue