[Mapbender-commits] r9275 - trunk/mapbender/http/print/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Aug 11 05:00:48 PDT 2015


Author: armin11
Date: 2015-08-11 05:00:48 -0700 (Tue, 11 Aug 2015)
New Revision: 9275

Modified:
   trunk/mapbender/http/print/classes/mbTextDecorator.php
Log:
Posibility toset the text color in the json configuration file

Modified: trunk/mapbender/http/print/classes/mbTextDecorator.php
===================================================================
--- trunk/mapbender/http/print/classes/mbTextDecorator.php	2015-08-03 11:57:19 UTC (rev 9274)
+++ trunk/mapbender/http/print/classes/mbTextDecorator.php	2015-08-11 12:00:48 UTC (rev 9275)
@@ -53,7 +53,12 @@
 	}
 	
 	public function decorate() {
-		$this->pdf->objPdf->setTextColor(0, 0, 0);
+		$rgb = array(0,0,0);
+		$fontColor = $this->conf->font_color;
+		if (isset($fontColor) && $fontColor !== "" && $fontColor !== null) {
+			$rgb = explode(',', $fontColor);
+		}
+		$this->pdf->objPdf->setTextColor($rgb[0], $rgb[1], $rgb[2]);
 		$this->pdf->objPdf->setFont($this->conf->font_family, "", $this->conf->font_size);
 		$this->pdf->objPdf->Text($this->conf->x_ul, $this->conf->y_ul, utf8_decode($this->value));
 	}



More information about the Mapbender_commits mailing list