1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:58:12 +00:00

Revert "PixelPaint: Add support for box sampling scaling"

This reverts commit d6aefb1bf1.
This commit is contained in:
Andreas Kling 2023-05-19 13:33:53 +02:00
parent 1c4d69681c
commit 20537ed3da
2 changed files with 3 additions and 14 deletions

View file

@ -69,18 +69,17 @@ ResizeImageDialog::ResizeImageDialog(Gfx::IntSize suggested_size, GUI::Window* p
auto nearest_neighbor_radio = main_widget->find_descendant_of_type_named<GUI::RadioButton>("nearest_neighbor_radio");
auto smooth_pixels_radio = main_widget->find_descendant_of_type_named<GUI::RadioButton>("smooth_pixels_radio");
auto bilinear_radio = main_widget->find_descendant_of_type_named<GUI::RadioButton>("bilinear_radio");
auto box_sampling_radio = main_widget->find_descendant_of_type_named<GUI::RadioButton>("box_sampling_radio");
auto resize_canvas_radio = main_widget->find_descendant_of_type_named<GUI::RadioButton>("resize_canvas");
VERIFY(nearest_neighbor_radio);
VERIFY(smooth_pixels_radio);
VERIFY(bilinear_radio);
VERIFY(box_sampling_radio);
VERIFY(resize_canvas_radio);
m_scaling_mode = Gfx::Painter::ScalingMode::NearestNeighbor;
if (bilinear_radio->is_checked())
if (bilinear_radio->is_checked()) {
m_scaling_mode = Gfx::Painter::ScalingMode::BilinearBlend;
}
nearest_neighbor_radio->on_checked = [this](bool is_checked) {
if (is_checked)
@ -94,10 +93,6 @@ ResizeImageDialog::ResizeImageDialog(Gfx::IntSize suggested_size, GUI::Window* p
if (is_checked)
m_scaling_mode = Gfx::Painter::ScalingMode::BilinearBlend;
};
box_sampling_radio->on_checked = [this](bool is_checked) {
if (is_checked)
m_scaling_mode = Gfx::Painter::ScalingMode::BoxSampling;
};
resize_canvas_radio->on_checked = [this](bool is_checked) {
if (is_checked)
m_scaling_mode = Gfx::Painter::ScalingMode::None;