Lines Matching defs:critere_style

1130 	function svgDefineStyle($critere_style)
1140 if (isset($critere_style['transform'])) {
1141 preg_match_all('/(matrix|translate|scale|rotate|skewX|skewY)\((.*?)\)/is', $critere_style['transform'], $m);
1217 if (isset($critere_style['style'])) {
1218 if (preg_match('/fill:\s*rgb\((\d+),\s*(\d+),\s*(\d+)\)/i', $critere_style['style'], $m)) { // mPDF 5.7.2
1221 $tmp = preg_replace("/(.*)fill:\s*([a-z0-9#_()]*|none)(.*)/i", "$2", $critere_style['style']);
1222 if ($tmp && $tmp != 'inherit' && $tmp != $critere_style['style']) {
1228 if ((preg_match("/[^-]opacity:\s*([a-z0-9.]*|none)/i", $critere_style['style'], $m) ||
1229 preg_match("/^opacity:\s*([a-z0-9.]*|none)/i", $critere_style['style'], $m)) && $m[1] != 'inherit') {
1234 $tmp = preg_replace("/(.*)fill-opacity:\s*([a-z0-9.]*|none)(.*)/i", "$2", $critere_style['style']);
1235 if ($tmp && $tmp != 'inherit' && $tmp != $critere_style['style']) {
1239 $tmp = preg_replace("/(.*)fill-rule:\s*([a-z0-9#]*|none)(.*)/i", "$2", $critere_style['style']);
1240 if ($tmp && $tmp != 'inherit' && $tmp != $critere_style['style']) {
1244 if (preg_match('/stroke:\s*rgb\((\d+),\s*(\d+),\s*(\d+)\)/', $critere_style['style'], $m)) {
1247 $tmp = preg_replace("/(.*)stroke:\s*([a-z0-9#]*|none)(.*)/i", "$2", $critere_style['style']);
1248 if ($tmp && $tmp != 'inherit' && $tmp != $critere_style['style']) {
1253 $tmp = preg_replace("/(.*)stroke-linecap:\s*([a-z0-9#]*|none)(.*)/i", "$2", $critere_style['style']);
1254 if ($tmp && $tmp != 'inherit' && $tmp != $critere_style['style']) {
1258 $tmp = preg_replace("/(.*)stroke-linejoin:\s*([a-z0-9#]*|none)(.*)/i", "$2", $critere_style['style']);
1259 if ($tmp && $tmp != 'inherit' && $tmp != $critere_style['style']) {
1263 $tmp = preg_replace("/(.*)stroke-miterlimit:\s*([a-z0-9#]*|none)(.*)/i", "$2", $critere_style['style']);
1264 if ($tmp && $tmp != 'inherit' && $tmp != $critere_style['style']) {
1268 $tmp = preg_replace("/(.*)stroke-opacity:\s*([a-z0-9.]*|none)(.*)/i", "$2", $critere_style['style']);
1269 if ($tmp && $tmp != 'inherit' && $tmp != $critere_style['style']) {
1273 $tmp = preg_replace("/(.*)stroke-width:\s*([a-z0-9.]*|none)(.*)/i", "$2", $critere_style['style']);
1274 if ($tmp && $tmp != 'inherit' && $tmp != $critere_style['style']) {
1278 $tmp = preg_replace("/(.*)stroke-dasharray:\s*([a-z0-9., ]*|none)(.*)/i", "$2", $critere_style['style']);
1279 if ($tmp && $tmp != 'inherit' && $tmp != $critere_style['style']) {
1283 $tmp = preg_replace("/(.*)stroke-dashoffset:\s*([a-z0-9.]*|none)(.*)/i", "$2", $critere_style['style']);
1284 if ($tmp && $tmp != 'inherit' && $tmp != $critere_style['style']) {
1290 if (isset($critere_style['opacity']) && $critere_style['opacity'] != 'inherit') {
1291 $current_style['fill-opacity'] = $critere_style['opacity'];
1292 $current_style['stroke-opacity'] = $critere_style['opacity'];
1295 if (isset($critere_style['fill']) && $critere_style['fill'] != 'inherit') {
1296 $current_style['fill'] = $critere_style['fill'];
1299 if (isset($critere_style['fill-opacity']) && $critere_style['fill-opacity'] != 'inherit') {
1300 $current_style['fill-opacity'] = $critere_style['fill-opacity'];
1303 if (isset($critere_style['fill-rule']) && $critere_style['fill-rule'] != 'inherit') {
1304 $current_style['fill-rule'] = $critere_style['fill-rule'];
1307 if (isset($critere_style['stroke']) && $critere_style['stroke'] != 'inherit') {
1308 $current_style['stroke'] = $critere_style['stroke'];
1311 if (isset($critere_style['stroke-linecap']) && $critere_style['stroke-linecap'] != 'inherit') {
1312 $current_style['stroke-linecap'] = $critere_style['stroke-linecap'];
1315 if (isset($critere_style['stroke-linejoin']) && $critere_style['stroke-linejoin'] != 'inherit') {
1316 $current_style['stroke-linejoin'] = $critere_style['stroke-linejoin'];
1319 if (isset($critere_style['stroke-miterlimit']) && $critere_style['stroke-miterlimit'] != 'inherit') {
1320 $current_style['stroke-miterlimit'] = $critere_style['stroke-miterlimit'];
1323 if (isset($critere_style['stroke-opacity']) && $critere_style['stroke-opacity'] != 'inherit') {
1324 $current_style['stroke-opacity'] = $critere_style['stroke-opacity'];
1327 if (isset($critere_style['stroke-width']) && $critere_style['stroke-width'] != 'inherit') {
1328 $current_style['stroke-width'] = $critere_style['stroke-width'];
1331 if (isset($critere_style['stroke-dasharray']) && $critere_style['stroke-dasharray'] != 'inherit') {
1332 $current_style['stroke-dasharray'] = $critere_style['stroke-dasharray'];
1334 if (isset($critere_style['stroke-dashoffset']) && $critere_style['stroke-dashoffset'] != 'inherit') {
1335 $current_style['stroke-dashoffset'] = $critere_style['stroke-dashoffset'];
1339 if (isset($critere_style['color']) && $critere_style['color'] != 'inherit') {
1340 $current_style['color'] = $critere_style['color'];
1348 function svgStyle($critere_style, $attribs, $element)
1354 if (substr_count($critere_style['fill'], 'url') > 0 && $element != 'line') {
1357 $id_gradient = preg_replace("/url\(#([\w_]*)\)/i", "$1", $critere_style['fill']);
1358 if ($id_gradient != $critere_style['fill']) {
1369 elseif (strtolower($critere_style['fill']) == 'currentcolor' && $element != 'line') {
1370 $col = $this->colorConverter->convert($critere_style['color'], $this->mpdf->PDFAXwarnings);
1373 $critere_style['fill-opacity'] = ord($col[4] / 100);
1376 $critere_style['fill-opacity'] = ord($col[5] / 100);
1381 } elseif ($critere_style['fill'] != 'none' && $element != 'line') {
1382 $col = $this->colorConverter->convert($critere_style['fill'], $this->mpdf->PDFAXwarnings);
1385 $critere_style['fill-opacity'] = ord($col[4] / 100);
1388 $critere_style['fill-opacity'] = ord($col[5] / 100);
1394 if (substr_count($critere_style['stroke'], 'url') > 0) {
1397 $id_gradient = preg_replace("/url\(#([\w_]*)\)/i","$1",$critere_style['stroke']);
1398 if ($id_gradient != $critere_style['stroke']) {
1410 elseif (strtolower($critere_style['stroke']) == 'currentcolor') {
1411 $col = $this->colorConverter->convert($critere_style['color'], $this->mpdf->PDFAXwarnings);
1414 $critere_style['stroke-opacity'] = ord($col[4] / 100);
1417 $critere_style['stroke-opacity'] = ord($col[5] / 100);
1421 $lw = $this->ConvertSVGSizePixels($critere_style['stroke-width']);
1424 } elseif ($critere_style['stroke'] != 'none') {
1425 $col = $this->colorConverter->convert($critere_style['stroke'], $this->mpdf->PDFAXwarnings);
1430 $critere_style['stroke-opacity'] = ord($col[4] / 100);
1433 $critere_style['stroke-opacity'] = ord($col[5] / 100);
1437 $lw = $this->ConvertSVGSizePixels($critere_style['stroke-width']);
1443 if ($critere_style['stroke'] != 'none') {
1444 if ($critere_style['stroke-linejoin'] == 'miter') {
1446 } elseif ($critere_style['stroke-linejoin'] == 'round') {
1448 } elseif ($critere_style['stroke-linejoin'] == 'bevel') {
1452 if ($critere_style['stroke-linecap'] == 'butt') {
1454 } elseif ($critere_style['stroke-linecap'] == 'round') {
1456 } elseif ($critere_style['stroke-linecap'] == 'square') {
1460 if (isset($critere_style['stroke-miterlimit'])) {
1461 if ($critere_style['stroke-miterlimit'] == 'none') {
1462 } elseif (preg_match('/^[\d.]+$/', $critere_style['stroke-miterlimit'])) {
1463 $path_style .= sprintf('%.2F M ', $critere_style['stroke-miterlimit']);
1467 if (isset($critere_style['stroke-dasharray'])) {
1470 $d = preg_split('/(,\s?|\s)/', $critere_style['stroke-dasharray']);
1491 if (isset($critere_style['stroke-dashoffset'])) {
1492 $off = $critere_style['stroke-dashoffset'] + 0;
1500 if ($critere_style['fill-rule'] == 'evenodd') {
1506 if (isset($critere_style['fill-opacity'])) {
1508 if ($critere_style['fill-opacity'] == 0) {
1510 } elseif ($critere_style['fill-opacity'] > 1) {
1512 } elseif ($critere_style['fill-opacity'] > 0) {
1513 $opacity = $critere_style['fill-opacity'];
1514 } elseif ($critere_style['fill-opacity'] < 0) {
1522 if (isset($critere_style['stroke-opacity'])) {
1524 if ($critere_style['stroke-opacity'] == 0) {
1526 } elseif ($critere_style['stroke-opacity'] > 1) {
1528 } elseif ($critere_style['stroke-opacity'] > 0) {
1529 $opacity = $critere_style['stroke-opacity'];
1530 } elseif ($critere_style['stroke-opacity'] < 0) {
2752 function svgDefineTxtStyle($critere_style)
2758 if (isset($critere_style['style'])) {
2760 if (preg_match('/fill:\s*rgb\((\d+),\s*(\d+),\s*(\d+)\)/', $critere_style['style'], $m)) {
2763 $tmp = preg_replace("/(.*)fill:\s*([a-z0-9#_()]*|none)(.*)/i", "$2", $critere_style['style']);
2764 if ($tmp && $tmp != 'inherit' && $tmp != $critere_style['style']) {
2770 if (preg_match("/[^-]opacity:\s*([a-z0-9.]*|none)/i", $critere_style['style'], $m) ||
2771 preg_match("/^opacity:\s*([a-z0-9.]*|none)/i", $critere_style['style'], $m)) {
2776 $tmp = preg_replace("/(.*)fill-opacity:\s*([a-z0-9.]*|none)(.*)/i", "$2", $critere_style['style']);
2777 if ($tmp && $tmp != 'inherit' && $tmp != $critere_style['style']) {
2781 $tmp = preg_replace("/(.*)fill-rule:\s*([a-z0-9#]*|none)(.*)/i", "$2", $critere_style['style']);
2782 if ($tmp != $critere_style['style'] && $tmp != $critere_style['style']) {
2786 if (preg_match('/stroke:\s*rgb\((\d+),\s*(\d+),\s*(\d+)\)/', $critere_style['style'], $m)) {
2789 $tmp = preg_replace("/(.*)stroke:\s*([a-z0-9#]*|none)(.*)/i", "$2", $critere_style['style']);
2790 if ($tmp && $tmp != 'inherit' && $tmp != $critere_style['style']) {
2795 $tmp = preg_replace("/(.*)stroke-linecap:\s*([a-z0-9#]*|none)(.*)/i", "$2", $critere_style['style']);
2796 if ($tmp && $tmp != 'inherit' && $tmp != $critere_style['style']) {
2800 $tmp = preg_replace("/(.*)stroke-linejoin:\s*([a-z0-9#]*|none)(.*)/i", "$2", $critere_style['style']);
2801 if ($tmp && $tmp != 'inherit' && $tmp != $critere_style['style']) {
2805 $tmp = preg_replace("/(.*)stroke-miterlimit:\s*([a-z0-9#]*|none)(.*)/i", "$2", $critere_style['style']);
2806 if ($tmp && $tmp != 'inherit' && $tmp != $critere_style['style']) {
2810 $tmp = preg_replace("/(.*)stroke-opacity:\s*([a-z0-9.]*|none)(.*)/i", "$2", $critere_style['style']);
2811 if ($tmp && $tmp != 'inherit' && $tmp != $critere_style['style']) {
2815 $tmp = preg_replace("/(.*)stroke-width:\s*([a-z0-9.]*|none)(.*)/i", "$2", $critere_style['style']);
2816 if ($tmp && $tmp != 'inherit' && $tmp != $critere_style['style']) {
2820 $tmp = preg_replace("/(.*)stroke-dasharray:\s*([a-z0-9., ]*|none)(.*)/i", "$2", $critere_style['style']);
2821 if ($tmp && $tmp != 'inherit' && $tmp != $critere_style['style']) {
2825 $tmp = preg_replace("/(.*)stroke-dashoffset:\s*([a-z0-9.]*|none)(.*)/i", "$2", $critere_style['style']);
2826 if ($tmp && $tmp != 'inherit' && $tmp != $critere_style['style']) {
2830 $tmp = preg_replace("/(.*)font-family:\s*([a-z0-9.\"' ,\-]*|none)(.*)/i", "$2", $critere_style['style']);
2831 if ($tmp && $tmp != 'inherit' && $tmp != $critere_style['style']) {
2832 $critere_style['font-family'] = $tmp;
2835 $tmp = preg_replace("/(.*)font-size:\s*([a-z0-9.]*|none)(.*)/i", "$2", $critere_style['style']);
2836 if ($tmp && $tmp != 'inherit' && $tmp != $critere_style['style']) {
2837 $critere_style['font-size'] = $tmp;
2840 $tmp = preg_replace("/(.*)font-weight:\s*([a-z0-9.]*|normal)(.*)/i", "$2", $critere_style['style']);
2841 if ($tmp && $tmp != 'inherit' && $tmp != $critere_style['style']) {
2842 $critere_style['font-weight'] = $tmp;
2845 $tmp = preg_replace("/(.*)font-style:\s*([a-z0-9.]*|normal)(.*)/i", "$2", $critere_style['style']);
2846 if ($tmp && $tmp != 'inherit' && $tmp != $critere_style['style']) {
2847 $critere_style['font-style'] = $tmp;
2850 $tmp = preg_replace("/(.*)font-variant:\s*([a-z0-9.]*|normal)(.*)/i", "$2", $critere_style['style']);
2851 if ($tmp && $tmp != 'inherit' && $tmp != $critere_style['style']) {
2852 $critere_style['font-variant'] = $tmp;
2855 $tmp = preg_replace("/(.*)text-anchor:\s*(start|middle|end)(.*)/i", "$2", $critere_style['style']);
2856 if ($tmp && $tmp != 'inherit' && $tmp != $critere_style['style']) {
2857 $critere_style['text-anchor'] = $tmp;
2861 if (isset($critere_style['font'])) {
2864 $tmp = preg_replace("/(.*)(italic|oblique)(.*)/i", "$2", $critere_style['font']);
2865 if ($tmp != $critere_style['font']) {
2872 $tmp = preg_replace("/(.*)(bold|bolder)(.*)/i", "$2", $critere_style['font']);
2873 if ($tmp != $critere_style['font']) {
2880 $tmp = preg_replace("/(.*)(small\-caps)(.*)/i", "$2", $critere_style['font']);
2881 if ($tmp != $critere_style['font']) {
2886 $tmp = preg_replace("/(.*)\b(\d+)[\b|\/](.*)/i", "$2", $critere_style['font']);
2887 if ($tmp != $critere_style['font']) {
2894 if (isset($critere_style['opacity']) && $critere_style['opacity'] != 'inherit') {
2895 $current_style['fill-opacity'] = $critere_style['opacity'];
2896 $current_style['stroke-opacity'] = $critere_style['opacity'];
2900 if (isset($critere_style['stroke-opacity']) && $critere_style['stroke-opacity'] != 'inherit') {
2901 $current_style['stroke-opacity'] = $critere_style['stroke-opacity'];
2905 if (isset($critere_style['fill-opacity']) && $critere_style['fill-opacity'] != 'inherit') {
2906 $current_style['fill-opacity'] = $critere_style['fill-opacity'];
2909 if (isset($critere_style['fill']) && $critere_style['fill'] != 'inherit') {
2910 $current_style['fill'] = $critere_style['fill'];
2913 if (isset($critere_style['stroke']) && $critere_style['stroke'] != 'inherit') {
2914 $current_style['stroke'] = $critere_style['stroke'];
2917 if (isset($critere_style['stroke-width']) && $critere_style['stroke-width'] != 'inherit') {
2918 $current_style['stroke-width'] = $critere_style['stroke-width'];
2921 if (isset($critere_style['font-style']) && $critere_style['font-style'] != 'inherit') {
2922 if (strtolower($critere_style['font-style']) == 'oblique') {
2923 $critere_style['font-style'] = 'italic';
2925 $current_style['font-style'] = $critere_style['font-style'];
2928 if (isset($critere_style['font-weight']) && $critere_style['font-weight'] != 'inherit') {
2929 if (strtolower($critere_style['font-weight']) == 'bolder') {
2930 $critere_style['font-weight'] = 'bold';
2932 $current_style['font-weight'] = $critere_style['font-weight'];
2935 if (isset($critere_style['font-variant']) && $critere_style['font-variant'] != 'inherit') {
2936 $current_style['font-variant'] = $critere_style['font-variant'];
2939 if (isset($critere_style['font-size']) && $critere_style['font-size'] != 'inherit') {
2940 if (strpos($critere_style['font-size'], '%') !== false) {
2943 $current_style['font-size'] = $this->ConvertSVGSizePts($critere_style['font-size']);
2947 if (isset($critere_style['font-family']) && $critere_style['font-family'] != 'inherit') {
2948 $v = $critere_style['font-family'];
2991 if (isset($critere_style['text-anchor']) && $critere_style['text-anchor'] != 'inherit') {
2992 $current_style['text-anchor'] = $critere_style['text-anchor'];
3670 $critere_style = $attribs;
3671 unset($critere_style['d']);
3672 $path_style = $this->svgDefineStyle($critere_style);
3720 $critere_style = $attribs;
3721 unset($critere_style['x'], $critere_style['y'], $critere_style['rx'], $critere_style['ry'], $critere_style['height'], $critere_style['width']);
3722 $path_style = $this->svgDefineStyle($critere_style);
3755 $critere_style = $attribs;
3756 unset($critere_style['cx'], $critere_style['cy'], $critere_style['r']);
3757 $path_style = $this->svgDefineStyle($critere_style);
3790 $critere_style = $attribs;
3791 unset($critere_style['cx'], $critere_style['cy'], $critere_style['rx'], $critere_style['ry']);
3792 $path_style = $this->svgDefineStyle($critere_style);
3804 $critere_style = $attribs;
3805 unset($critere_style['x1'], $critere_style['y1'], $critere_style['x2'], $critere_style['y2']);
3806 $path_style = $this->svgDefineStyle($critere_style);
3823 $critere_style = $attribs;
3824 unset($critere_style['points']);
3825 $path_style = $this->svgDefineStyle($critere_style);
3843 $critere_style = $attribs;
3844 unset($critere_style['points']);
3845 $path_style = $this->svgDefineStyle($critere_style);
3944 $critere_style = $attribs;
3945 unset($critere_style['x'], $critere_style['y']);
3946 $this->svgDefineTxtStyle($critere_style);
4034 $critere_style = $attribs;
4035 unset($critere_style['x'], $critere_style['y']);
4036 $this->svgDefineTxtStyle($critere_style);
4051 $critere_style = $attribs;
4052 unset($critere_style['x'], $critere_style['y']);
4053 $this->svgDefineTxtStyle($critere_style);