mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:07:34 +00:00
Revert "PixelPaint: Add support for box sampling scaling"
This reverts commit d6aefb1bf1
.
This commit is contained in:
parent
1c4d69681c
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 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 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 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");
|
auto resize_canvas_radio = main_widget->find_descendant_of_type_named<GUI::RadioButton>("resize_canvas");
|
||||||
|
|
||||||
VERIFY(nearest_neighbor_radio);
|
VERIFY(nearest_neighbor_radio);
|
||||||
VERIFY(smooth_pixels_radio);
|
VERIFY(smooth_pixels_radio);
|
||||||
VERIFY(bilinear_radio);
|
VERIFY(bilinear_radio);
|
||||||
VERIFY(box_sampling_radio);
|
|
||||||
VERIFY(resize_canvas_radio);
|
VERIFY(resize_canvas_radio);
|
||||||
|
|
||||||
m_scaling_mode = Gfx::Painter::ScalingMode::NearestNeighbor;
|
m_scaling_mode = Gfx::Painter::ScalingMode::NearestNeighbor;
|
||||||
if (bilinear_radio->is_checked())
|
if (bilinear_radio->is_checked()) {
|
||||||
m_scaling_mode = Gfx::Painter::ScalingMode::BilinearBlend;
|
m_scaling_mode = Gfx::Painter::ScalingMode::BilinearBlend;
|
||||||
|
}
|
||||||
|
|
||||||
nearest_neighbor_radio->on_checked = [this](bool is_checked) {
|
nearest_neighbor_radio->on_checked = [this](bool is_checked) {
|
||||||
if (is_checked)
|
if (is_checked)
|
||||||
|
@ -94,10 +93,6 @@ ResizeImageDialog::ResizeImageDialog(Gfx::IntSize suggested_size, GUI::Window* p
|
||||||
if (is_checked)
|
if (is_checked)
|
||||||
m_scaling_mode = Gfx::Painter::ScalingMode::BilinearBlend;
|
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) {
|
resize_canvas_radio->on_checked = [this](bool is_checked) {
|
||||||
if (is_checked)
|
if (is_checked)
|
||||||
m_scaling_mode = Gfx::Painter::ScalingMode::None;
|
m_scaling_mode = Gfx::Painter::ScalingMode::None;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
@GUI::Widget {
|
@GUI::Widget {
|
||||||
fill_with_background_color: true
|
fill_with_background_color: true
|
||||||
min_width: 260
|
min_width: 260
|
||||||
min_height: 280
|
min_height: 260
|
||||||
layout: @GUI::VerticalBoxLayout {
|
layout: @GUI::VerticalBoxLayout {
|
||||||
margins: [4]
|
margins: [4]
|
||||||
}
|
}
|
||||||
|
@ -93,12 +93,6 @@
|
||||||
autosize: true
|
autosize: true
|
||||||
}
|
}
|
||||||
|
|
||||||
@GUI::RadioButton {
|
|
||||||
name: "box_sampling_radio"
|
|
||||||
text: "Box Sampling"
|
|
||||||
autosize: true
|
|
||||||
}
|
|
||||||
|
|
||||||
@GUI::RadioButton {
|
@GUI::RadioButton {
|
||||||
name: "resize_canvas"
|
name: "resize_canvas"
|
||||||
text: "Resize Canvas (None)"
|
text: "Resize Canvas (None)"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue