summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Dennedy <dan@dennedy.org>2015-07-20 07:21:24 (GMT)
committer Dan Dennedy <dan@dennedy.org>2015-07-20 07:21:24 (GMT)
commitd00cda5a755bc7b32a57e746286b7b71403a16b1 (patch)
tree304316f145ad7a7b79a45e52e774f555513896be
parent455c441a5d978109e00c5d05b9f0ec73617c51c3 (diff)
Fix compile error in ndvi with Cairo.
-rw-r--r--src/filter/ndvi/ndvi.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/filter/ndvi/ndvi.cpp b/src/filter/ndvi/ndvi.cpp
index 17e75c7..b7054b7 100644
--- a/src/filter/ndvi/ndvi.cpp
+++ b/src/filter/ndvi/ndvi.cpp
@@ -62,7 +62,7 @@ private:
void drawLegend(uint32_t *out);
void drawRect( uint32_t* out, uint8_t r, uint8_t g, uint8_t b, unsigned int x, unsigned int y, unsigned int w, unsigned int h );
void drawGradient( uint32_t* out, unsigned int x, unsigned int y, unsigned int w, unsigned int h );
- void drawText( std::string text, unsigned int x, unsigned int y, unsigned int textHeight );
+ void drawText( uint32_t* out, std::string text, unsigned int x, unsigned int y, unsigned int textHeight );
double paramLutLevels;
std::string paramColorMap;
@@ -258,13 +258,13 @@ void Ndvi::drawLegend(uint32_t* out)
unsigned int textY = height - ( gradientHeight - textHeight ) / 2;
unsigned int textX = width / 25;
if (paramIndex == "vi") {
- drawText( "0", textX, textY , textHeight );
- drawText( "VI", width / 2, textY , textHeight );
- drawText( "1", width - textX, textY , textHeight );
+ drawText( out, "0", textX, textY , textHeight );
+ drawText( out, "VI", width / 2, textY , textHeight );
+ drawText( out, "1", width - textX, textY , textHeight );
} else { // ndvi
- drawText( "-1", textX, textY , textHeight );
- drawText( "NDVI", width / 2, textY , textHeight );
- drawText( "1", width - textX, textY , textHeight );
+ drawText( out, "-1", textX, textY , textHeight );
+ drawText( out, "NDVI", width / 2, textY , textHeight );
+ drawText( out, "1", width - textX, textY , textHeight );
}
}
@@ -296,7 +296,7 @@ void Ndvi::drawGradient( uint32_t* out, unsigned int x, unsigned int y, unsigned
}
}
-void Ndvi::drawText( std::string text, unsigned int x, unsigned int y, unsigned int textHeight )
+void Ndvi::drawText( uint32_t* out, std::string text, unsigned int x, unsigned int y, unsigned int textHeight )
{
#ifdef HAVE_CAIRO
int stride = cairo_format_stride_for_width (CAIRO_FORMAT_ARGB32, width);