- Change display options to be passed down from the window, and have the imageselector pass a struct back that contains image metadata
- Added ImageDisplayOptions_t to control user controllable options for how we show an image (aspect filtering, stretching) - Added ImageDetails_t to encapsulate image metadata along with its image options
This commit is contained in:
28
src/imagestructs.h
Normal file
28
src/imagestructs.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#ifndef IMAGESTRUCTS_H
|
||||
#define IMAGESTRUCTS_H
|
||||
|
||||
#include <string>
|
||||
|
||||
// possible aspect ratios of an image
|
||||
enum EImageAspect { EImageAspect_Landscape = 0, EImageAspect_Portrait, EImageAspect_Any };
|
||||
|
||||
// options to consider when displaying an image
|
||||
struct ImageDisplayOptions_t
|
||||
{
|
||||
EImageAspect onlyAspect = EImageAspect_Any;
|
||||
bool fitAspectAxisToWindow = false;
|
||||
};
|
||||
|
||||
// details of a particular image
|
||||
struct ImageDetails_t
|
||||
{
|
||||
int width = 0;
|
||||
int height = 0;
|
||||
int rotation = 0;
|
||||
EImageAspect aspect = EImageAspect_Any;
|
||||
std::string filename;
|
||||
ImageDisplayOptions_t options;
|
||||
};
|
||||
|
||||
|
||||
#endif // IMAGESTRUCTS_H
|
||||
Reference in New Issue
Block a user