resizable images
This commit is contained in:
+8
-5
@@ -6,12 +6,14 @@
|
||||
|
||||
#include "Image.hpp"
|
||||
#include "imgui.h"
|
||||
#include "imgui_impl_glfw.h"
|
||||
#include "imgui_impl_opengl3.h"
|
||||
#include "rendering/CvMatRender.hpp"
|
||||
|
||||
namespace pixelarium::ui
|
||||
{
|
||||
static bool dim_changed_p(const ImVec2& ref_rect, const ImVec2& new_rect);
|
||||
|
||||
static ImVec2 ascpet_const_dimensions(const pixelarium::imaging::Image& img, const ImVec2& curr_dim);
|
||||
|
||||
enum LogLevelSelection
|
||||
{
|
||||
Debug = 0,
|
||||
@@ -31,16 +33,17 @@ class AppGLFW
|
||||
void LoadImageProt();
|
||||
|
||||
private:
|
||||
LogLevelSelection log_level_ = static_cast<LogLevelSelection>(0);
|
||||
// LogLevelSelection log_level_ = static_cast<LogLevelSelection>(0);
|
||||
GLFWwindow* window = nullptr;
|
||||
ImGuiWindowFlags window_flags = 0;
|
||||
std::shared_ptr<pixelarium::imaging::Image> _img;
|
||||
pixelarium::render::CvMatRender _render;
|
||||
bool _imagep { false };
|
||||
bool _imagep{false};
|
||||
ImVec2 _curr_dim;
|
||||
};
|
||||
|
||||
static void glfw_error_callback(int error, const char* description)
|
||||
{
|
||||
fprintf(stderr, "GLFW Error %d: %s\n", error, description);
|
||||
}
|
||||
} // namespace ui
|
||||
} // namespace pixelarium::ui
|
||||
Reference in New Issue
Block a user