37
35
NumberOfRotations = 4
38
struct RenderResolution
42
qreal devicePixelRatio;
44
RenderResolution(int resolutionX = 72, int resolutionY = 72,
45
qreal devicePixelRatio = 1.0) :
46
resolutionX(resolutionX),
47
resolutionY(resolutionY),
48
devicePixelRatio(devicePixelRatio) {}
50
bool operator==(const RenderResolution& other) const
52
return resolutionX == other.resolutionX
53
&& resolutionY == other.resolutionY
54
&& qFuzzyCompare(devicePixelRatio, other.devicePixelRatio);
57
bool operator!=(const RenderResolution& other) const { return !operator==(other); }
63
RenderResolution resolution;
69
RenderParam(const RenderResolution& resolution = RenderResolution(),
70
qreal scaleFactor = 1.0, Rotation rotation = RotateBy0, bool invertColors = false) :
71
resolution(resolution),
72
scaleFactor(scaleFactor),
74
invertColors(invertColors) {}
76
bool operator==(const RenderParam& other) const
78
return resolution == other.resolution
79
&& qFuzzyCompare(scaleFactor, other.scaleFactor)
80
&& rotation == other.rotation
81
&& invertColors == other.invertColors;
84
bool operator!=(const RenderParam& other) const { return !operator==(other); }
40
88
enum RubberBandMode