@@ -563,10 +563,11 @@ void QgsMapCanvas::render(QPaintDevice * theQPaintDevice)
563
563
if ( ! theQPaintDevice ) // painting to mapCanvas->pixmap
564
564
{
565
565
mCanvasProperties ->pmCanvas ->fill (mCanvasProperties ->bgColor );
566
- std::cout << (QString (" R: %i G: %i B: %i for canvas background" ).arg (
567
- mCanvasProperties ->bgColor .red (),
568
- mCanvasProperties ->bgColor .red (),
569
- mCanvasProperties ->bgColor .red ())).toLocal8Bit ().data () << std::endl;
566
+ QColor myColor = mCanvasProperties ->bgColor ;
567
+ std::cout << " Canvas background R: " ;
568
+ std::cout << myColor.red () << " G: " ;
569
+ std::cout << myColor.green () << " B: " ;
570
+ std::cout << myColor.blue () << std::endl;
570
571
paint->begin (mCanvasProperties ->pmCanvas );
571
572
if (mCanvasProperties ->mAntiAliasFlag )
572
573
{
@@ -2745,10 +2746,16 @@ void QgsMapCanvas::setMapTool(int tool)
2745
2746
2746
2747
2747
2748
/* * Write property of QColor bgColor. */
2748
- void QgsMapCanvas::setCanvasColor (const QColor & _newVal )
2749
+ void QgsMapCanvas::setCanvasColor (const QColor & theColor )
2749
2750
{
2750
- mCanvasProperties ->bgColor = _newVal;
2751
- setEraseColor (_newVal);
2751
+ mCanvasProperties ->bgColor = theColor;
2752
+ setEraseColor (theColor);
2753
+ QColor myColor = mCanvasProperties ->bgColor ;
2754
+ std::cout << " Setting Canvas background R: " ;
2755
+ std::cout << myColor.red () << " G: " ;
2756
+ std::cout << myColor.green () << " B: " ;
2757
+ std::cout << myColor.blue () << std::endl;
2758
+
2752
2759
} // setCanvasColor
2753
2760
2754
2761
0 commit comments