mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-26 00:08:20 -04:00
Run clang-tidy modernize-use-override to remove all the redundant virtual keywords from overridden methods, and add some missing overrides. Another benefit is that this has also added the overrides on destructors, which will cause a build failure if a base class is missing a virtual destructor.
123 lines
3.5 KiB
Plaintext
123 lines
3.5 KiB
Plaintext
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/core/qgsmaptopixelgeometrysimplifier.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
class QgsMapToPixelSimplifier : QgsAbstractGeometrySimplifier
|
|
{
|
|
%Docstring
|
|
Implementation of GeometrySimplifier using the "MapToPixel" algorithm
|
|
|
|
Simplifies a geometry removing points within of the maximum distance difference that defines the MapToPixel info of a RenderContext request.
|
|
This class enables simplify the geometries to be rendered in a MapCanvas target to speed up the vector drawing.
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgsmaptopixelgeometrysimplifier.h"
|
|
%End
|
|
public:
|
|
enum SimplifyAlgorithm
|
|
{
|
|
Distance,
|
|
SnapToGrid,
|
|
Visvalingam,
|
|
};
|
|
|
|
QgsMapToPixelSimplifier( int simplifyFlags, double tolerance, SimplifyAlgorithm simplifyAlgorithm = Distance );
|
|
%Docstring
|
|
Constructor
|
|
%End
|
|
|
|
enum SimplifyFlag
|
|
{
|
|
NoFlags,
|
|
SimplifyGeometry,
|
|
SimplifyEnvelope,
|
|
};
|
|
|
|
protected:
|
|
|
|
|
|
|
|
static float calculateLengthSquared2D( double x1, double y1, double x2, double y2 );
|
|
%Docstring
|
|
Returns the squared 2D-distance of the vector defined by the two points specified
|
|
|
|
:rtype: float
|
|
%End
|
|
|
|
static bool equalSnapToGrid( double x1, double y1, double x2, double y2, double gridOriginX, double gridOriginY, float gridInverseSizeXY );
|
|
%Docstring
|
|
Returns whether the points belong to the same grid
|
|
|
|
:rtype: bool
|
|
%End
|
|
|
|
public:
|
|
int simplifyFlags() const;
|
|
%Docstring
|
|
Gets the simplification hints of the vector layer managed
|
|
|
|
:rtype: int
|
|
%End
|
|
void setSimplifyFlags( int simplifyFlags );
|
|
%Docstring
|
|
Sets the simplification hints of the vector layer managed
|
|
%End
|
|
|
|
SimplifyAlgorithm simplifyAlgorithm() const;
|
|
%Docstring
|
|
Gets the local simplification algorithm of the vector layer managed
|
|
|
|
:rtype: SimplifyAlgorithm
|
|
%End
|
|
void setSimplifyAlgorithm( SimplifyAlgorithm simplifyAlgorithm );
|
|
%Docstring
|
|
Sets the local simplification algorithm of the vector layer managed
|
|
%End
|
|
|
|
virtual QgsGeometry simplify( const QgsGeometry &geometry ) const;
|
|
|
|
%Docstring
|
|
Returns a simplified version the specified geometry
|
|
|
|
:rtype: QgsGeometry
|
|
%End
|
|
|
|
void setTolerance( double value );
|
|
%Docstring
|
|
Sets the tolerance of the vector layer managed
|
|
%End
|
|
|
|
public:
|
|
|
|
static bool isGeneralizableByMapBoundingBox( const QgsRectangle &envelope, double map2pixelTol );
|
|
%Docstring
|
|
Returns whether the envelope can be replaced by its BBOX when is applied the specified map2pixel context
|
|
|
|
:rtype: bool
|
|
%End
|
|
|
|
bool isGeneralizableByMapBoundingBox( const QgsRectangle &envelope ) const;
|
|
%Docstring
|
|
Returns whether the envelope can be replaced by its BBOX when is applied the specified map2pixel context
|
|
|
|
:rtype: bool
|
|
%End
|
|
};
|
|
|
|
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/core/qgsmaptopixelgeometrysimplifier.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|