mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:57:45 +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
|
@ -527,6 +527,17 @@ void Image::crop(Gfx::IntRect const& cropped_rect)
|
|||
did_change_rect(cropped_rect);
|
||||
}
|
||||
|
||||
void Image::resize(Gfx::IntSize const& new_size, Gfx::Painter::ScalingMode scaling_mode)
|
||||
{
|
||||
for (auto& layer : m_layers) {
|
||||
layer.resize(new_size, scaling_mode);
|
||||
}
|
||||
|
||||
m_size = { new_size.width(), new_size.height() };
|
||||
did_change_rect();
|
||||
|
||||
}
|
||||
|
||||
Color Image::color_at(Gfx::IntPoint const& point) const
|
||||
{
|
||||
Color color;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue