26 , mRasterViewPort( nullptr )
77 myProjectedViewExtent = rendererContext.
extent();
78 myProjectedLayerExtent = layer->
extent();
104 mRasterViewPort->mDrawnExtent = myRasterExtent;
107 mRasterViewPort->mSrcCRS = layer->
crs();
116 mRasterViewPort->mSrcDatumTransform = -1;
117 mRasterViewPort->mDestDatumTransform = -1;
130 mRasterViewPort->mTopLeftPoint.
setX( floor( mRasterViewPort->mTopLeftPoint.x() ) );
131 mRasterViewPort->mTopLeftPoint.setY( floor( mRasterViewPort->mTopLeftPoint.y() ) );
132 mRasterViewPort->mBottomRightPoint.setX( ceil( mRasterViewPort->mBottomRightPoint.x() ) );
133 mRasterViewPort->mBottomRightPoint.setY( ceil( mRasterViewPort->mBottomRightPoint.y() ) );
137 mRasterViewPort->mBottomRightPoint.y() ),
139 mRasterViewPort->mTopLeftPoint.y() )
143 mRasterViewPort->mWidth =
static_cast<int>( mRasterViewPort->mBottomRightPoint.x() - mRasterViewPort->mTopLeftPoint.x() );
144 mRasterViewPort->mHeight =
static_cast<int>( mRasterViewPort->mBottomRightPoint.y() - mRasterViewPort->mTopLeftPoint.y() );
int width() const
Accessor that returns the width of the (unclipped) raster.
A rectangle specified with double values.
void setMapRotation(double degrees, double cx, double cy)
Set map rotation in degrees (clockwise)
void setMinimal()
Set a rectangle so that min corner is at max and max corner is at min.
Base class for processing modules.
void setCRS(const QgsCoordinateReferenceSystem &theSrcCRS, const QgsCoordinateReferenceSystem &theDestCRS, int srcDatumTransform=-1, int destDatumTransform=-1)
set source and destination CRS
Iterator for sequentially processing raster cells.
This class provides qgis with the ability to render raster datasets onto the mapcanvas.
QgsRasterPipe * pipe()
Get raster pipe.
~QgsRasterLayerRenderer()
const QgsMapToPixel * mMapToPixel
QgsRasterProjector * projector() const
const QgsCoordinateReferenceSystem & crs() const
Returns layer's spatial reference system.
QgsRasterInterface * last() const
QgsPoint toMapCoordinates(int x, int y) const
QgsRectangle intersect(const QgsRectangle *rect) const
return the intersection with the given rectangle
int height() const
Accessor that returns the height of the (unclipped) raster.
QString tr(const char *sourceText, const char *disambiguation, int n)
virtual bool render() override
Do the rendering (based on data stored in the class)
double y() const
Get the y value of the point.
double mapRotation() const
Return current map rotation in degrees.
QgsCoordinateReferenceSystem mDestCRS
Target coordinate system.
void set(const QgsPoint &p1, const QgsPoint &p2)
Set the rectangle from two QgsPoints.
QgsPoint transform(const QgsPoint &p) const
Transform the point from map (world) coordinates to device coordinates.
QString toString(bool automaticPrecision=false) const
returns string representation of form xmin,ymin xmax,ymax
Perform transforms between map coordinates and device coordinates.
The drawing pipe for raster layers.
int mapWidth() const
Return current map width in pixels The information is only known if setRotation was used...
int mapHeight() const
Return current map height in pixels.
#define QgsDebugMsgLevel(str, level)
bool isEmpty() const
test if rectangle is empty.
const QgsRectangle & extent() const
QgsRasterLayerRenderer(QgsRasterLayer *layer, QgsRenderContext &rendererContext)
static void logMessage(const QString &message, const QString &tag=QString::null, MessageLevel level=WARNING)
add a message to the instance (and create it if necessary)
const QgsCoordinateTransform * coordinateTransform() const
double mapUnitsPerPixel() const
Return current map units per pixel.
A class to represent a point.
void setX(double x)
Sets the x value of the point.
double yMinimum() const
Get the y minimum value (bottom side of rectangle)
QgsCoordinateReferenceSystem mSrcCRS
Source coordinate system.
double xMaximum() const
Get the x maximum value (right side of rectangle)
QgsRasterViewPort * mRasterViewPort
Contains information about the context of a rendering operation.
const QgsMapToPixel & mapToPixel() const
Class for storing a coordinate reference system (CRS)
double xMinimum() const
Get the x minimum value (left side of rectangle)
Base class for utility classes that encapsulate information necessary for rendering of map layers...
double yMaximum() const
Get the y maximum value (top side of rectangle)
QgsRasterDataProvider * dataProvider()
Returns the data provider.
Custom exception class for Coordinate Reference System related exceptions.
This class provides details of the viewable area that a raster will be rendered into.
double rasterScaleFactor() const
QgsPoint toMapCoordinatesF(double x, double y) const
Transform device coordinates to map (world) coordinates.
virtual QgsRectangle extent()
Return the extent of the layer.
double scaleFactor() const
void setDpi(int dpi)
Sets the output device resolution.
double x() const
Get the x value of the point.