[QGIS Commit] r8247 - in branches/rendercontext-branch/src/core: .
raster
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Wed Mar 19 03:30:47 EDT 2008
Author: mhugent
Date: 2008-03-19 03:30:46 -0400 (Wed, 19 Mar 2008)
New Revision: 8247
Modified:
branches/rendercontext-branch/src/core/qgsmaplayer.cpp
branches/rendercontext-branch/src/core/qgsmaplayer.h
branches/rendercontext-branch/src/core/qgsmaprender.cpp
branches/rendercontext-branch/src/core/qgsmaptopixel.cpp
branches/rendercontext-branch/src/core/qgsmaptopixel.h
branches/rendercontext-branch/src/core/qgsrect.cpp
branches/rendercontext-branch/src/core/qgsrect.h
branches/rendercontext-branch/src/core/qgsrendercontext.cpp
branches/rendercontext-branch/src/core/qgsrendercontext.h
branches/rendercontext-branch/src/core/qgsvectorlayer.cpp
branches/rendercontext-branch/src/core/qgsvectorlayer.h
branches/rendercontext-branch/src/core/raster/qgsrasterlayer.cpp
branches/rendercontext-branch/src/core/raster/qgsrasterlayer.h
Log:
Moved QPainter into rendering context. Changed raster layer to draw with rendring context
Modified: branches/rendercontext-branch/src/core/qgsmaplayer.cpp
===================================================================
--- branches/rendercontext-branch/src/core/qgsmaplayer.cpp 2008-03-18 18:53:58 UTC (rev 8246)
+++ branches/rendercontext-branch/src/core/qgsmaplayer.cpp 2008-03-19 07:30:46 UTC (rev 8247)
@@ -126,7 +126,7 @@
return mLayerExtent;
}
-bool QgsMapLayer::draw(QPainter* painter, const QgsRenderContext& renderContext)
+bool QgsMapLayer::draw(QgsRenderContext& renderContext)
{
return false;
}
Modified: branches/rendercontext-branch/src/core/qgsmaplayer.h
===================================================================
--- branches/rendercontext-branch/src/core/qgsmaplayer.h 2008-03-18 18:53:58 UTC (rev 8246)
+++ branches/rendercontext-branch/src/core/qgsmaplayer.h 2008-03-19 07:30:46 UTC (rev 8247)
@@ -71,7 +71,7 @@
*/
QString const & name() const;
- virtual bool draw(QPainter* painter, const QgsRenderContext& renderContext);
+ virtual bool draw(QgsRenderContext& renderContext);
/** Draw labels
* @TODO to be removed: used only in vector layers
Modified: branches/rendercontext-branch/src/core/qgsmaprender.cpp
===================================================================
--- branches/rendercontext-branch/src/core/qgsmaprender.cpp 2008-03-18 18:53:58 UTC (rev 8246)
+++ branches/rendercontext-branch/src/core/qgsmaprender.cpp 2008-03-19 07:30:46 UTC (rev 8247)
@@ -224,6 +224,10 @@
renderTime.start();
#endif
+ mRenderContext.setDrawEditingInformation(!mOverview);
+ mRenderContext.setPainter(painter);
+ mRenderContext.setCoordTransform(0);
+
// render all layers in the stack, starting at the base
QListIterator<QString> li(mLayerSet);
li.toBack();
@@ -280,9 +284,8 @@
}
mRenderContext.setCoordTransform(ct);
- mRenderContext.setDrawEditingInformation(!mOverview);
- if (!ml->draw(painter, mRenderContext))
+ if (!ml->draw(mRenderContext))
{
emit drawError(ml);
}
Modified: branches/rendercontext-branch/src/core/qgsmaptopixel.cpp
===================================================================
--- branches/rendercontext-branch/src/core/qgsmaptopixel.cpp 2008-03-18 18:53:58 UTC (rev 8246)
+++ branches/rendercontext-branch/src/core/qgsmaptopixel.cpp 2008-03-19 07:30:46 UTC (rev 8247)
@@ -59,7 +59,7 @@
mMapUnitsPerPixel = mupp;
}
-double QgsMapToPixel::mapUnitsPerPixel()
+double QgsMapToPixel::mapUnitsPerPixel() const
{
return mMapUnitsPerPixel;
}
Modified: branches/rendercontext-branch/src/core/qgsmaptopixel.h
===================================================================
--- branches/rendercontext-branch/src/core/qgsmaptopixel.h 2008-03-18 18:53:58 UTC (rev 8246)
+++ branches/rendercontext-branch/src/core/qgsmaptopixel.h 2008-03-19 07:30:46 UTC (rev 8247)
@@ -87,7 +87,7 @@
void setMapUnitsPerPixel(double mupp);
//! Return current map units per pixel
- double mapUnitsPerPixel();
+ double mapUnitsPerPixel() const;
//! Set maximum y value
void setYmax(double ymax);
Modified: branches/rendercontext-branch/src/core/qgsrect.cpp
===================================================================
--- branches/rendercontext-branch/src/core/qgsrect.cpp 2008-03-18 18:53:58 UTC (rev 8246)
+++ branches/rendercontext-branch/src/core/qgsrect.cpp 2008-03-19 07:30:46 UTC (rev 8247)
@@ -127,7 +127,7 @@
ymax = centerY + newHeight;
}
-QgsRect QgsRect::intersect(QgsRect * rect)
+QgsRect QgsRect::intersect(QgsRect * rect) const
{
QgsRect intersection = QgsRect();
Modified: branches/rendercontext-branch/src/core/qgsrect.h
===================================================================
--- branches/rendercontext-branch/src/core/qgsrect.h 2008-03-18 18:53:58 UTC (rev 8246)
+++ branches/rendercontext-branch/src/core/qgsrect.h 2008-03-19 07:30:46 UTC (rev 8247)
@@ -81,7 +81,7 @@
//! Expand the rectangle to support zoom out scaling
void expand(double, const QgsPoint *c = 0);
//! return the intersection with the given rectangle
- QgsRect intersect(QgsRect *rect);
+ QgsRect intersect(QgsRect *rect) const;
//! expand the rectangle so that covers both the original rectangle and the given rectangle
void combineExtentWith(QgsRect *rect);
//! expand the rectangle so that covers both the original rectangle and the given point
Modified: branches/rendercontext-branch/src/core/qgsrendercontext.cpp
===================================================================
--- branches/rendercontext-branch/src/core/qgsrendercontext.cpp 2008-03-18 18:53:58 UTC (rev 8246)
+++ branches/rendercontext-branch/src/core/qgsrendercontext.cpp 2008-03-19 07:30:46 UTC (rev 8247)
@@ -18,7 +18,7 @@
#include "qgsrendercontext.h"
-QgsRenderContext::QgsRenderContext(): mCoordTransform(0), mDrawEditingInformation(false), mForceVectorOutput(true), mRenderingStopped(false), mScaleFactor(1.0)
+QgsRenderContext::QgsRenderContext(): mPainter(0), mCoordTransform(0), mDrawEditingInformation(false), mForceVectorOutput(true), mRenderingStopped(false), mScaleFactor(1.0)
{
}
Modified: branches/rendercontext-branch/src/core/qgsrendercontext.h
===================================================================
--- branches/rendercontext-branch/src/core/qgsrendercontext.h 2008-03-18 18:53:58 UTC (rev 8246)
+++ branches/rendercontext-branch/src/core/qgsrendercontext.h 2008-03-19 07:30:46 UTC (rev 8247)
@@ -22,6 +22,8 @@
#include "qgsmaptopixel.h"
#include "qgsrect.h"
+class QPainter;
+
/**Contains information about the context of a rendering operation*/
class QgsRenderContext
{
@@ -30,6 +32,9 @@
~QgsRenderContext();
//getters
+
+ QPainter* painter() {return mPainter;}
+
const QgsCoordinateTransform* coordTransform() const {return mCoordTransform;}
const QgsRect& extent() const {return mExtent;}
@@ -54,6 +59,7 @@
void setDrawEditingInformation(bool b){mDrawEditingInformation = b;}
void setRenderingStopped(bool stopped){mRenderingStopped = stopped;}
void setScaleFactor(double factor){mScaleFactor = factor;}
+ void setPainter(QPainter* p){mPainter = p;}
private:
@@ -61,24 +67,27 @@
QgsRenderContext(const QgsRenderContext& other){}
QgsRenderContext& operator=(const QgsRenderContext&){}
- /**For transformation between coordinate systems. Can be 0 if on-the-fly reprojection is not used*/
- QgsCoordinateTransform* mCoordTransform;
-
- /**True if vertex markers for editing should be drawn*/
- bool mDrawEditingInformation;
-
- QgsRect mExtent;
-
+ /**Painter for rendering operations*/
+ QPainter* mPainter;
+
+ /**For transformation between coordinate systems. Can be 0 if on-the-fly reprojection is not used*/
+ QgsCoordinateTransform* mCoordTransform;
+
+ /**True if vertex markers for editing should be drawn*/
+ bool mDrawEditingInformation;
+
+ QgsRect mExtent;
+
/**If true then no rendered vector elements should be cached as image*/
- bool mForceVectorOutput;
-
- QgsMapToPixel mMapToPixel;
-
- /**True if the rendering has been canceled*/
- bool mRenderingStopped;
-
- /**Factor to scale line widths and point marker sizes*/
- double mScaleFactor;
+ bool mForceVectorOutput;
+
+ QgsMapToPixel mMapToPixel;
+
+ /**True if the rendering has been canceled*/
+ bool mRenderingStopped;
+
+ /**Factor to scale line widths and point marker sizes*/
+ double mScaleFactor;
};
#endif
Modified: branches/rendercontext-branch/src/core/qgsvectorlayer.cpp
===================================================================
--- branches/rendercontext-branch/src/core/qgsvectorlayer.cpp 2008-03-18 18:53:58 UTC (rev 8246)
+++ branches/rendercontext-branch/src/core/qgsvectorlayer.cpp 2008-03-19 07:30:46 UTC (rev 8247)
@@ -711,14 +711,20 @@
return ptr;
}
-bool QgsVectorLayer::draw(QPainter* painter, const QgsRenderContext& renderContext)
+bool QgsVectorLayer::draw(QgsRenderContext& renderContext)
{
//set update threshold before each draw to make sure the current setting is picked up
QSettings settings;
mUpdateThreshold = settings.readNumEntry("Map/updateThreshold", 0);
//draw ( p, viewExtent, theMapToPixelTransform, ct, drawingToEditingCanvas, 1., 1.);
- draw(painter, renderContext.extent(), &(renderContext.mapToPixel()), renderContext.coordTransform(), \
+ QPainter* thePainter = renderContext.painter();
+ if(!thePainter)
+ {
+ return false;
+ }
+
+ draw(thePainter, renderContext.extent(), &(renderContext.mapToPixel()), renderContext.coordTransform(), \
renderContext.drawEditingInformation(), renderContext.scaleFactor(), renderContext.scaleFactor());
return TRUE; // Assume success always
}
Modified: branches/rendercontext-branch/src/core/qgsvectorlayer.h
===================================================================
--- branches/rendercontext-branch/src/core/qgsvectorlayer.h 2008-03-18 18:53:58 UTC (rev 8246)
+++ branches/rendercontext-branch/src/core/qgsvectorlayer.h 2008-03-19 07:30:46 UTC (rev 8247)
@@ -337,7 +337,7 @@
/** Draws the layer
* @return FALSE if an error occurred during drawing
*/
- bool draw(QPainter* painter, const QgsRenderContext& renderContext);
+ bool draw(QgsRenderContext& renderContext);
/** Draws the layer labels using coordinate transformation */
void drawLabels(QPainter* painter, const QgsRenderContext& renderContext);
Modified: branches/rendercontext-branch/src/core/raster/qgsrasterlayer.cpp
===================================================================
--- branches/rendercontext-branch/src/core/raster/qgsrasterlayer.cpp 2008-03-18 18:53:58 UTC (rev 8246)
+++ branches/rendercontext-branch/src/core/raster/qgsrasterlayer.cpp 2008-03-19 07:30:46 UTC (rev 8247)
@@ -27,6 +27,7 @@
#include "qgsrasterpyramid.h"
#include "qgsrasterviewport.h"
#include "qgsrect.h"
+#include "qgsrendercontext.h"
#include "qgsspatialrefsys.h"
#include "gdalwarper.h"
@@ -1000,9 +1001,8 @@
}
}
-bool QgsRasterLayer::draw(QPainter* painter, const QgsRenderContext& renderContext)
+bool QgsRasterLayer::draw(QgsRenderContext& renderContext)
{
-#if 0 //todo: adapt to render context
QgsDebugMsg("QgsRasterLayer::draw(4 arguments): entered.");
//Dont waste time drawing if transparency is at 0 (completely transparent)
@@ -1016,6 +1016,15 @@
return FALSE;
}
+ const QgsMapToPixel& theQgsMapToPixel = renderContext.mapToPixel();
+ const QgsRect& theViewExtent = renderContext.extent();
+ QPainter* theQPainter = renderContext.painter();
+
+ if(!theQPainter)
+ {
+ return false;
+ }
+
// clip raster extent to view extent
QgsRect myRasterExtent = theViewExtent.intersect(&mLayerExtent);
if (myRasterExtent.isEmpty())
@@ -1118,14 +1127,14 @@
}
// get dimensions of clipped raster image in device coordinate space (this is the size of the viewport)
- myRasterViewPort->topLeftPoint = theQgsMapToPixel->transform(myRasterExtent.xMin(), myRasterExtent.yMax());
- myRasterViewPort->bottomRightPoint = theQgsMapToPixel->transform(myRasterExtent.xMax(), myRasterExtent.yMin());
+ myRasterViewPort->topLeftPoint = theQgsMapToPixel.transform(myRasterExtent.xMin(), myRasterExtent.yMax());
+ myRasterViewPort->bottomRightPoint = theQgsMapToPixel.transform(myRasterExtent.xMax(), myRasterExtent.yMin());
- myRasterViewPort->drawableAreaXDim = static_cast<int> (fabs( (myRasterViewPort->clippedWidth / theQgsMapToPixel->mapUnitsPerPixel() * mGeoTransform[1])) + 0.5);
- myRasterViewPort->drawableAreaYDim = static_cast<int> (fabs( (myRasterViewPort->clippedHeight / theQgsMapToPixel->mapUnitsPerPixel() * mGeoTransform[5])) + 0.5);
+ myRasterViewPort->drawableAreaXDim = static_cast<int> (fabs( (myRasterViewPort->clippedWidth / theQgsMapToPixel.mapUnitsPerPixel() * mGeoTransform[1])) + 0.5);
+ myRasterViewPort->drawableAreaYDim = static_cast<int> (fabs( (myRasterViewPort->clippedHeight / theQgsMapToPixel.mapUnitsPerPixel() * mGeoTransform[5])) + 0.5);
#ifdef QGISDEBUG
- QgsLogger::debug("QgsRasterLayer::draw: mapUnitsPerPixel", theQgsMapToPixel->mapUnitsPerPixel(), 1, __FILE__,\
+ QgsLogger::debug("QgsRasterLayer::draw: mapUnitsPerPixel", theQgsMapToPixel.mapUnitsPerPixel(), 1, __FILE__,\
__FUNCTION__, __LINE__);
QgsLogger::debug("QgsRasterLayer::draw: mRasterXDim", mRasterXDim, 1, __FILE__, __FUNCTION__, __LINE__);
QgsLogger::debug("QgsRasterLayer::draw: mRasterYDim", mRasterYDim, 1, __FILE__, __FUNCTION__, __LINE__);
@@ -1200,9 +1209,9 @@
// Below should calculate to the actual pixel size of the
// part of the layer that's visible.
static_cast<int>( fabs( (myRasterViewPort->clippedXMax - myRasterViewPort->clippedXMin)
- / theQgsMapToPixel->mapUnitsPerPixel() * mGeoTransform[1]) + 1),
+ / theQgsMapToPixel.mapUnitsPerPixel() * mGeoTransform[1]) + 1),
static_cast<int>( fabs( (myRasterViewPort->clippedYMax - myRasterViewPort->clippedYMin)
- / theQgsMapToPixel->mapUnitsPerPixel() * mGeoTransform[5]) + 1)
+ / theQgsMapToPixel.mapUnitsPerPixel() * mGeoTransform[5]) + 1)
// myRasterViewPort->drawableAreaXDim,
// myRasterViewPort->drawableAreaYDim
);
@@ -1270,7 +1279,7 @@
// draw(theQPainter,myRasterViewPort);
// /\/\/\ - commented-out to handle zoomed-in rasters
// \/\/\/ - added to handle zoomed-in rasters
- draw(theQPainter, myRasterViewPort, theQgsMapToPixel);
+ draw(theQPainter, myRasterViewPort, &theQgsMapToPixel);
// /\/\/\ - added to handle zoomed-in rasters
}
@@ -1278,7 +1287,6 @@
delete myRasterViewPort;
QgsDebugMsg("QgsRasterLayer::draw: exiting.");
-#endif //0
return TRUE;
@@ -1286,7 +1294,7 @@
void QgsRasterLayer::draw (QPainter * theQPainter,
QgsRasterViewPort * theRasterViewPort,
- QgsMapToPixel * theQgsMapToPixel)
+ const QgsMapToPixel* theQgsMapToPixel)
{
QgsDebugMsg("QgsRasterLayer::draw (3 arguments)");
//
@@ -1424,7 +1432,7 @@
} //end of draw method
-void QgsRasterLayer::drawSingleBandGray(QPainter * theQPainter, QgsRasterViewPort * theRasterViewPort, QgsMapToPixel * theQgsMapToPixel, int theBandNo)
+void QgsRasterLayer::drawSingleBandGray(QPainter * theQPainter, QgsRasterViewPort * theRasterViewPort, const QgsMapToPixel* theQgsMapToPixel, int theBandNo)
{
QgsDebugMsg("QgsRasterLayer::drawSingleBandGray called for layer " + QString::number(theBandNo));
//Invalid band number, segfault prevention
@@ -1526,7 +1534,7 @@
void QgsRasterLayer::drawSingleBandPseudoColor(QPainter * theQPainter,
QgsRasterViewPort * theRasterViewPort,
- QgsMapToPixel * theQgsMapToPixel,
+ const QgsMapToPixel* theQgsMapToPixel,
int theBandNo)
{
QgsDebugMsg("QgsRasterLayer::drawSingleBandPseudoColor called");
@@ -1631,7 +1639,7 @@
* @param theGdalBand - pointer to the GDALRasterBand which should be rendered.
*/
void QgsRasterLayer::drawPalettedSingleBandColor(QPainter * theQPainter, QgsRasterViewPort * theRasterViewPort,
- QgsMapToPixel * theQgsMapToPixel, int theBandNo)
+ const QgsMapToPixel* theQgsMapToPixel, int theBandNo)
{
QgsDebugMsg("QgsRasterLayer::drawPalettedSingleBandColor called");
//Invalid band number, segfault prevention
@@ -1715,7 +1723,7 @@
* @param theColorQString - QString containing either 'Red' 'Green' or 'Blue' indicating which part of the rgb triplet will be used to render gray.
*/
void QgsRasterLayer::drawPalettedSingleBandGray(QPainter * theQPainter, QgsRasterViewPort * theRasterViewPort,
- QgsMapToPixel * theQgsMapToPixel, int theBandNo,
+ const QgsMapToPixel* theQgsMapToPixel, int theBandNo,
QString const & theColorQString)
{
QgsDebugMsg("QgsRasterLayer::drawPalettedSingleBandGray called");
@@ -1814,7 +1822,7 @@
* @param theColorQString - QString containing either 'Red' 'Green' or 'Blue' indicating which part of the rgb triplet will be used to render gray.
*/
void QgsRasterLayer::drawPalettedSingleBandPseudoColor(QPainter * theQPainter, QgsRasterViewPort * theRasterViewPort,
- QgsMapToPixel * theQgsMapToPixel, int theBandNo,
+ const QgsMapToPixel* theQgsMapToPixel, int theBandNo,
QString const & theColorQString)
{
QgsDebugMsg("QgsRasterLayer::drawPalettedSingleBandPseudoColor called");
@@ -1944,7 +1952,7 @@
* @param theGdalBand - pointer to the GDALRasterBand which should be rendered.
*/
void QgsRasterLayer::drawPalettedMultiBandColor(QPainter * theQPainter, QgsRasterViewPort * theRasterViewPort,
- QgsMapToPixel * theQgsMapToPixel, int theBandNo)
+ const QgsMapToPixel* theQgsMapToPixel, int theBandNo)
{
QgsDebugMsg("QgsRasterLayer::drawPalettedMultiBandColor called");
//Invalid band number, segfault prevention
@@ -2051,7 +2059,7 @@
void QgsRasterLayer::drawMultiBandSingleBandGray(QPainter * theQPainter, QgsRasterViewPort * theRasterViewPort,
- QgsMapToPixel * theQgsMapToPixel, int theBandNo)
+ const QgsMapToPixel* theQgsMapToPixel, int theBandNo)
{
//delegate to drawSingleBandGray!
drawSingleBandGray(theQPainter, theRasterViewPort, theQgsMapToPixel, theBandNo);
@@ -2059,7 +2067,7 @@
void QgsRasterLayer::drawMultiBandSingleBandPseudoColor(QPainter * theQPainter, QgsRasterViewPort * theRasterViewPort,
- QgsMapToPixel * theQgsMapToPixel, int theBandNo)
+ const QgsMapToPixel* theQgsMapToPixel, int theBandNo)
{
//delegate to drawSinglePseudocolor!
drawSingleBandPseudoColor(theQPainter, theRasterViewPort, theQgsMapToPixel, theBandNo);
@@ -2067,7 +2075,7 @@
void QgsRasterLayer::drawMultiBandColor(QPainter * theQPainter, QgsRasterViewPort * theRasterViewPort,
- QgsMapToPixel * theQgsMapToPixel)
+ const QgsMapToPixel* theQgsMapToPixel)
{
QgsDebugMsg("QgsRasterLayer::drawMultiBandColor called");
int myRedBandNo = getRasterBandNumber(mRedBandName);
@@ -5259,7 +5267,7 @@
}
}
-void QgsRasterLayer::paintImageToCanvas(QPainter* theQPainter, QgsRasterViewPort * theRasterViewPort, QgsMapToPixel * theQgsMapToPixel, QImage* theImage)
+void QgsRasterLayer::paintImageToCanvas(QPainter* theQPainter, QgsRasterViewPort * theRasterViewPort, const QgsMapToPixel* theQgsMapToPixel, QImage* theImage)
{
// Set up the initial offset into the myQImage we want to copy to the map canvas
// This is useful when the source image pixels are larger than the screen image.
Modified: branches/rendercontext-branch/src/core/raster/qgsrasterlayer.h
===================================================================
--- branches/rendercontext-branch/src/core/raster/qgsrasterlayer.h 2008-03-18 18:53:58 UTC (rev 8246)
+++ branches/rendercontext-branch/src/core/raster/qgsrasterlayer.h 2008-03-19 07:30:46 UTC (rev 8247)
@@ -277,11 +277,11 @@
/** \brief This is called when the view on the rasterlayer needs to be refreshed (redrawn).
*/
- bool draw(QPainter* painter, const QgsRenderContext& renderContext);
+ bool draw(QgsRenderContext& renderContext);
/** \brief This is an overloaded version of the above function that is called by both draw above and drawThumbnail */
void draw(QPainter * theQPainter, QgsRasterViewPort * myRasterViewPort,
- QgsMapToPixel * theQgsMapToPixel = 0);
+ const QgsMapToPixel* theQgsMapToPixel = 0);
//
// Accessors for image height and width
@@ -875,13 +875,13 @@
/** \brief Drawing routine for single band grayscale image. */
void drawSingleBandGray(QPainter * theQPainter,
QgsRasterViewPort * theRasterViewPort,
- QgsMapToPixel * theQgsMapToPixel,
+ const QgsMapToPixel* theQgsMapToPixel,
int theBandNoInt);
/** \brief Drawing routine for single band grayscale image, rendered in pseudocolor. */
void drawSingleBandPseudoColor(QPainter * theQPainter,
QgsRasterViewPort * theRasterViewPort,
- QgsMapToPixel * theQgsMapToPixel,
+ const QgsMapToPixel* theQgsMapToPixel,
int theBandNoInt);
@@ -892,27 +892,27 @@
/** \brief Drawing routine for paletted image, rendered as a single band image in color. */
void drawPalettedSingleBandColor(QPainter * theQPainter,
QgsRasterViewPort * theRasterViewPort,
- QgsMapToPixel * theQgsMapToPixel,
+ const QgsMapToPixel* theQgsMapToPixel,
int theBandNoInt);
/** \brief Drawing routine for paletted image, rendered as a single band image in grayscale. */
void drawPalettedSingleBandGray(QPainter * theQPainter,
QgsRasterViewPort * theRasterViewPort,
- QgsMapToPixel * theQgsMapToPixel,
+ const QgsMapToPixel* theQgsMapToPixel,
int theBandNoInt,
const QString & theColorQString);
/** \brief Drawing routine for paletted image, rendered as a single band image in pseudocolor. */
void drawPalettedSingleBandPseudoColor(QPainter * theQPainter,
QgsRasterViewPort * theRasterViewPort,
- QgsMapToPixel * theQgsMapToPixel,
+ const QgsMapToPixel* theQgsMapToPixel,
int theBandNoInt,
const QString & theColorQString);
/** \brief Drawing routine for paletted multiband image. */
void drawPalettedMultiBandColor(QPainter * theQPainter,
QgsRasterViewPort * theRasterViewPort,
- QgsMapToPixel * theQgsMapToPixel,
+ const QgsMapToPixel* theQgsMapToPixel,
int theBandNoInt);
//
@@ -922,23 +922,23 @@
/** \brief Drawing routine for multiband image, rendered as a single band image in grayscale. */
void drawMultiBandSingleBandGray(QPainter * theQPainter,
QgsRasterViewPort * theRasterViewPort,
- QgsMapToPixel * theQgsMapToPixel,
+ const QgsMapToPixel* theQgsMapToPixel,
int theBandNoInt);
/** \brief Drawing routine for multiband image, rendered as a single band image in pseudocolor. */
void drawMultiBandSingleBandPseudoColor(QPainter * theQPainter,
QgsRasterViewPort * theRasterViewPort,
- QgsMapToPixel * theQgsMapToPixel,
+ const QgsMapToPixel* theQgsMapToPixel,
int theBandNoInt);
/** \brief Drawing routine for multiband image */
void drawMultiBandColor(QPainter * theQPainter,
QgsRasterViewPort * theRasterViewPort,
- QgsMapToPixel * theQgsMapToPixel);
+ const QgsMapToPixel* theQgsMapToPixel);
/** \brief Places the rendered image onto the canvas */
void paintImageToCanvas(QPainter* theQPainter, QgsRasterViewPort * theRasterViewPort,
- QgsMapToPixel * theQgsMapToPixel, QImage* theImage);
+ const QgsMapToPixel* theQgsMapToPixel, QImage* theImage);
/** \brief Read color table from GDAL raster band */
void readColorTable ( GDALRasterBandH gdalBand, QgsColorTable *theColorTable );
More information about the QGIS-commit
mailing list