mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-30 23:12:56 +00:00
Revert "PixelPaint: Add support for box sampling scaling"
This reverts commit d6aefb1bf1
.
This commit is contained in:
parent
1c4d69681c
commit
20537ed3da
Notes:
sideshowbarker
2024-07-16 22:17:03 +09:00
Author: https://github.com/awesomekling
Commit: 20537ed3da
2 changed files with 3 additions and 14 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue