Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix syntax error #131

Merged
merged 1 commit into from
May 11, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions libs/mpdf/classes/svg.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
// http://www.godisaduck.com/svg2pdf_with_fpdf
// http://rhodopsin.blogspot.com
//
// cette class etendue est open source, toute modification devra cependant etre repertori�e~
// cette class etendue est open source, toute modification devra cependant etre repertoriée~


// NB UNITS - Works in pixels as main units - converting to PDF units when outputing to PDF string
// and on returning size

class SVG {

var $svg_gradient; // array - contient les infos sur les gradient fill du svg class� par id du svg
var $svg_gradient; // array - contient les infos sur les gradient fill du svg classé par id du svg
var $svg_shadinglist; // array - contient les ids des objet shading
var $svg_info; // array contenant les infos du svg voulue par l'utilisateur
var $svg_attribs; // array - holds all attributes of root <svg> tag
var $svg_style; // array contenant les style de groupes du svg
var $svg_string; // String contenant le tracage du svg en lui m�me.
var $svg_string; // String contenant le tracage du svg en lui même.
var $txt_data; // array - holds string info to write txt to image
var $txt_style; // array - current text style
var $mpdf_ref;
Expand Down Expand Up @@ -924,7 +924,7 @@ function svgStyle($critere_style, $attribs, $element){
$path_style = '';
if (substr_count($critere_style['fill'],'url')>0 && $element != 'line'){
//
// couleur degrad�
// couleur degradé
$id_gradient = preg_replace("/url\(#([\w_]*)\)/i","$1",$critere_style['fill']);
if ($id_gradient != $critere_style['fill']) {
if (isset($this->svg_gradient[$id_gradient])) {
Expand Down Expand Up @@ -1727,7 +1727,7 @@ function svgRect($arguments){

//
// fonction retracant les <ellipse /> et <circle />
// le cercle est trac� grave a 4 bezier cubic, les poitn de controles
// le cercle est tracé grave a 4 bezier cubic, les poitn de controles
// sont deduis grace a la constante kappa * rayon
function svgEllipse($arguments){
if ($arguments['rx']==0 || $arguments['ry']==0) { return ''; } // mPDF 4.4.003
Expand Down Expand Up @@ -2309,7 +2309,7 @@ function xml_svg2pdf_start($parser, $name, $attribs){
return;
}
else if (strtolower($name) == 'stop'){
if (!$last_gradid) break;
if (!$last_gradid) return;
if (isset($attribs['style']) AND preg_match('/stop-color:\s*([^;]*)/i',$attribs['style'],$m)) {
$color = trim($m[1]);
} else if (isset($attribs['stop-color'])) {
Expand Down Expand Up @@ -2516,7 +2516,7 @@ function xml_svg2pdf_start($parser, $name, $attribs){
}

//
//insertion des path et du style dans le flux de donn� general.
//insertion des path et du style dans le flux de donné general.
if (isset($path_cmd) && $path_cmd) { // mPDF 4.4.003
// mPDF 5.0
list($prestyle,$poststyle) = $svg_class->svgStyle($path_style, $attribs, strtolower($name));
Expand Down