Skip to content

Commit

Permalink
Merge pull request #17 from Way2Web/master
Browse files Browse the repository at this point in the history
Support for PHP 7.1 (non-numeric value encountered).
  • Loading branch information
PhenX authored May 24, 2017
2 parents 34b53c9 + 0a98695 commit a85f7fe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Svg/Surface/SurfaceCpdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -377,11 +377,11 @@ public function setStyle(Style $style)
$canvas = $this->canvas;

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

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

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

$this->canvas->selectFont("$family.afm");
}
}
}

0 comments on commit a85f7fe

Please sign in to comment.