Rasterizer fix to flip Y axis if it's coordinate origin is in the TOP_LEFT corner.

This commit is contained in:
tamasmeszaros 2018-07-18 09:46:55 +02:00
parent a5d6064ad6
commit b82bc5feba
2 changed files with 19 additions and 5 deletions

View file

@ -27,6 +27,11 @@ public:
PNG //!> PNG compression
};
enum class Origin {
TOP_LEFT,
BOTTOM_LEFT
};
/// Type that represents a resolution in pixels.
struct Resolution {
unsigned width_px;
@ -46,7 +51,8 @@ public:
};
/// Constructor taking the resolution and the pixel dimension.
explicit Raster(const Resolution& r, const PixelDim& pd );
explicit Raster(const Resolution& r, const PixelDim& pd,
Origin o = Origin::TOP_LEFT );
Raster();
Raster(const Raster& cpy) = delete;
Raster& operator=(const Raster& cpy) = delete;