Merge pull request #124 from goat1000/master

Fixed gradient offsets for percentage-based stops.
This commit is contained in:
Nicola Asuni 2019-09-19 10:03:56 +01:00 committed by GitHub
commit 8d5e30ddf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23995,7 +23995,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
case 'stop': {
// gradient stops
if (substr($attribs['offset'], -1) == '%') {
$offset = floatval(substr($attribs['offset'], -1)) / 100;
$offset = floatval(substr($attribs['offset'], 0, -1)) / 100;
} else {
$offset = floatval($attribs['offset']);
if ($offset > 1) {