mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-10 10:21:46 +08:00
Convert static data to compile time constants
This commit is contained in:
parent
4a2acf9a7e
commit
b1bfef44ba
@ -11,11 +11,6 @@
|
|||||||
|
|
||||||
namespace Slic3r { namespace sla {
|
namespace Slic3r { namespace sla {
|
||||||
|
|
||||||
const RasterBase::TMirroring RasterBase::NoMirror = {false, false};
|
|
||||||
const RasterBase::TMirroring RasterBase::MirrorX = {true, false};
|
|
||||||
const RasterBase::TMirroring RasterBase::MirrorY = {false, true};
|
|
||||||
const RasterBase::TMirroring RasterBase::MirrorXY = {true, true};
|
|
||||||
|
|
||||||
EncodedRaster PNGRasterEncoder::operator()(const void *ptr, size_t w, size_t h,
|
EncodedRaster PNGRasterEncoder::operator()(const void *ptr, size_t w, size_t h,
|
||||||
size_t num_components)
|
size_t num_components)
|
||||||
{
|
{
|
||||||
|
@ -60,10 +60,10 @@ public:
|
|||||||
enum Orientation { roLandscape, roPortrait };
|
enum Orientation { roLandscape, roPortrait };
|
||||||
|
|
||||||
using TMirroring = std::array<bool, 2>;
|
using TMirroring = std::array<bool, 2>;
|
||||||
static const TMirroring NoMirror;
|
static const constexpr TMirroring NoMirror = {false, false};
|
||||||
static const TMirroring MirrorX;
|
static const constexpr TMirroring MirrorX = {true, false};
|
||||||
static const TMirroring MirrorY;
|
static const constexpr TMirroring MirrorY = {false, true};
|
||||||
static const TMirroring MirrorXY;
|
static const constexpr TMirroring MirrorXY = {true, true};
|
||||||
|
|
||||||
struct Trafo {
|
struct Trafo {
|
||||||
bool mirror_x = false, mirror_y = false, flipXY = false;
|
bool mirror_x = false, mirror_y = false, flipXY = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user