mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:07:35 +00:00
ImageViewer: Allow choice between nearest neighbor and bilinear scaling
Currently, ImageViewer always uses nearest neighbor scaling. This allows the user to choose whether to use nearest neighbor or bilinear scaling. It current defaults to nearest neighbor.
This commit is contained in:
parent
e179cf2540
commit
8eb01c0b11
3 changed files with 33 additions and 2 deletions
|
@ -10,6 +10,7 @@
|
|||
|
||||
#include <LibCore/Timer.h>
|
||||
#include <LibGUI/Frame.h>
|
||||
#include <LibGUI/Painter.h>
|
||||
#include <LibGfx/Point.h>
|
||||
#include <LibImageDecoderClient/Client.h>
|
||||
|
||||
|
@ -37,6 +38,7 @@ public:
|
|||
void set_scaled_for_first_image(bool val) { m_scaled_for_first_image = val; }
|
||||
void set_path(const String& path);
|
||||
void resize_window();
|
||||
void set_scaling_mode(Gfx::Painter::ScalingMode);
|
||||
|
||||
bool is_next_available() const;
|
||||
bool is_previous_available() const;
|
||||
|
@ -86,6 +88,7 @@ private:
|
|||
Gfx::FloatPoint m_saved_pan_origin;
|
||||
Vector<String> m_files_in_same_dir;
|
||||
Optional<size_t> m_current_index;
|
||||
Gfx::Painter::ScalingMode m_scaling_mode { Gfx::Painter::ScalingMode::NearestNeighbor };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue