This commit is contained in:
Malte Hübner 2018-02-17 13:12:09 +01:00
parent 9756b498b2
commit 5eef819c05
2 changed files with 12 additions and 2 deletions

View File

@ -4,9 +4,16 @@ namespace StaticMapLite\Element\Polyline;
class Polyline
{
/** @var string $polyline */
protected $polyline = null;
/** @var int $colorRed */
protected $colorRed = 0;
/** @var int $colorGreen */
protected $colorGreen = 0;
/** @var int $colorBlue */
protected $colorBlue = 0;
public function __construct(string $polyline, int $colorRed = 0, int $colorGreen = 0, int $colorBlue = 0)

View File

@ -10,6 +10,9 @@ use StaticMapLite\Util;
class PolylinePrinter
{
/** @var int $thickness */
protected $thickness = 3;
/** @var Polyline $polyline */
protected $polyline = null;
@ -40,11 +43,11 @@ class PolylinePrinter
$endPoint = array_pop($pointList);
$canvas->getImage()->draw()->line($startPoint, $endPoint, $color, 3);
$canvas->getImage()->draw()->line($startPoint, $endPoint, $color, $this->thickness);
$startPoint = $endPoint;
}
return $this;
}