QGIS API Documentation
3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
src
core
qgsmapunitscale.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsmapunitscale.h
3
Struct for storing maximum and minimum scales for measurements in map units
4
-------------------
5
begin : April 2014
6
copyright : (C) Sandro Mani
7
email : smani at sourcepole dot ch
8
9
***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
18
#ifndef QGSMAPUNITSCALE_H
19
#define QGSMAPUNITSCALE_H
20
21
#include "qgis_core.h"
22
#include "
qgis.h
"
23
24
class
QgsRenderContext
;
25
36
class
CORE_EXPORT
QgsMapUnitScale
37
{
38
public
:
39
46
explicit
QgsMapUnitScale
(
double
minScale = 0.0,
double
maxScale = 0.0 )
47
: minScale( minScale )
48
, maxScale( maxScale )
49
{}
50
55
double
minScale
;
56
61
double
maxScale
;
62
64
bool
minSizeMMEnabled =
false
;
66
double
minSizeMM = 0.0;
68
bool
maxSizeMMEnabled =
false
;
70
double
maxSizeMM = 0.0;
71
78
double
computeMapUnitsPerPixel(
const
QgsRenderContext
&
c
)
const
;
79
80
bool
operator==
(
const
QgsMapUnitScale
&other )
const
81
{
82
return
qgsDoubleNear
( minScale, other.
minScale
)
83
&&
qgsDoubleNear
( maxScale, other.
maxScale
)
84
&& minSizeMMEnabled == other.
minSizeMMEnabled
85
&&
qgsDoubleNear
( minSizeMM, other.
minSizeMM
)
86
&& maxSizeMMEnabled == other.
maxSizeMMEnabled
87
&&
qgsDoubleNear
( maxSizeMM, other.
maxSizeMM
);
88
}
89
90
bool
operator!=
(
const
QgsMapUnitScale
&other )
const
91
{
92
return
!
operator==
( other );
93
}
94
};
95
96
97
#endif
// QGSMAPUNITSCALE_H
98
99
100
QgsMapUnitScale
Struct for storing maximum and minimum scales for measurements in map units.
Definition
qgsmapunitscale.h:37
QgsMapUnitScale::QgsMapUnitScale
QgsMapUnitScale(double minScale=0.0, double maxScale=0.0)
Constructor for QgsMapUnitScale.
Definition
qgsmapunitscale.h:46
QgsMapUnitScale::minSizeMMEnabled
bool minSizeMMEnabled
Whether the minimum size in mm should be respected.
Definition
qgsmapunitscale.h:64
QgsMapUnitScale::maxScale
double maxScale
The maximum scale, or 0.0 if unset.
Definition
qgsmapunitscale.h:61
QgsMapUnitScale::operator!=
bool operator!=(const QgsMapUnitScale &other) const
Definition
qgsmapunitscale.h:90
QgsMapUnitScale::minScale
double minScale
The minimum scale, or 0.0 if unset.
Definition
qgsmapunitscale.h:55
QgsMapUnitScale::operator==
bool operator==(const QgsMapUnitScale &other) const
Definition
qgsmapunitscale.h:80
QgsMapUnitScale::maxSizeMM
double maxSizeMM
The maximum size in millimeters, or 0.0 if unset.
Definition
qgsmapunitscale.h:70
QgsMapUnitScale::maxSizeMMEnabled
bool maxSizeMMEnabled
Whether the maximum size in mm should be respected.
Definition
qgsmapunitscale.h:68
QgsMapUnitScale::minSizeMM
double minSizeMM
The minimum size in millimeters, or 0.0 if unset.
Definition
qgsmapunitscale.h:66
QgsRenderContext
Contains information about the context of a rendering operation.
Definition
qgsrendercontext.h:62
c
As part of the API refactoring and improvements which landed in the Processing API was substantially reworked from the x version This was done in order to allow much of the underlying Processing framework to be ported into c
Definition
porting_processing.dox:1
qgis.h
qgsDoubleNear
bool qgsDoubleNear(double a, double b, double epsilon=4 *std::numeric_limits< double >::epsilon())
Compare two doubles (but allow some difference)
Definition
qgis.h:6024
operator==
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
Definition
qgsfeatureiterator.h:433
Generated on Sun Dec 15 2024 01:32:01 for QGIS API Documentation by
1.9.8