Skip to content

Commit a85f7fe

Browse files
authored
Merge pull request #17 from Way2Web/master
Support for PHP 7.1 (non-numeric value encountered).
2 parents 34b53c9 + 0a98695 commit a85f7fe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Svg/Surface/SurfaceCpdf.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,11 +377,11 @@ public function setStyle(Style $style)
377377
$canvas = $this->canvas;
378378

379379
if (is_array($style->stroke) && $stroke = $style->stroke) {
380-
$canvas->setStrokeColor(array($stroke[0]/255, $stroke[1]/255, $stroke[2]/255), true);
380+
$canvas->setStrokeColor(array((float)$stroke[0]/255, (float)$stroke[1]/255, (float)$stroke[2]/255), true);
381381
}
382382

383383
if (is_array($style->fill) && $fill = $style->fill) {
384-
$canvas->setColor(array($fill[0]/255, $fill[1]/255, $fill[2]/255), true);
384+
$canvas->setColor(array((float)$fill[0]/255, (float)$fill[1]/255, (float)$fill[2]/255), true);
385385
}
386386

387387
if ($fillRule = strtolower($style->fillRule)) {
@@ -483,4 +483,4 @@ public function setFont($family, $style, $weight)
483483

484484
$this->canvas->selectFont("$family.afm");
485485
}
486-
}
486+
}

0 commit comments

Comments
 (0)