Fixed 'scale to fit' functionality of WidgetImage

This commit is contained in:
2025-12-15 16:54:28 +02:00
parent c626578557
commit 17f73211a9
3 changed files with 57 additions and 4 deletions

View File

@@ -42,6 +42,11 @@ public:
virtual void draw() override;
static std::unique_ptr<Widget> builder(const nlohmann::json& j);
protected:
// Create a new surface of the image_surface that is scaled via RESIZE_FIT method
// NOTE: The user MUST free the surface when done with it
SDL_Surface* image_scale_fit();
};
#endif // WIDGET_IMAGE_H_