scantools
1.0.7
Graphics manipulation with a view towards scanned documents
|
93 return (_resolution <= 0);
101 return qFuzzyIsNull(_resolution);
116 operator QString()
const {
117 return QString(
"%1dpi").arg(
get(
dpi));
128 return _resolution == other._resolution;
187 return res1._resolution > res2._resolution ? res1 : res2;
length operator/(qreal numerator, const resolution denominator)
Divide a scalar ("number of dots") by a resolution to obtain a length.
static const int maxResDPI
Maximal resolution handled by scantools.
bool operator==(const resolution other) const
Check for equality.
The length stores a length and converts between units.
@ dpcm
Pixel per Centimeter.
bool isValid() const
Check if resolution is valid.
static const int minResDPI
Minimal resolution handled by scantools.
void set(qreal l, unit u)
Sets resolution in given unit.
unit
List of supported units.
friend resolution qMax(const resolution res1, const resolution res2)
Find the maximum of two resolutions.
@ dpm
Pixel per Millimeter.
The resolution class stores a resolution and converts between units.
qreal get(unit u) const
Get numerical value for resolution.
resolution()
Constructs a zero resolution.
bool isZero() const
Fuzzy check if resolution is zero.
qreal get(unit u) const
Returns length in given unit.
resolution(qreal l, unit u)
Constructs resolution of given value and unit.
resolution operator/(qreal numerator, const length denominator)
Divide a scalar by a length to obtain a resolution.
bool isNonPositive() const
Check if resolution is zero or less.