mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
Update dompdf deps
This commit is contained in:
parent
42c7c3ae7a
commit
e55ac3e4a2
12
library/vendor/dompdf/SOURCE
vendored
12
library/vendor/dompdf/SOURCE
vendored
@ -5,12 +5,12 @@ tar xzf dompdf-0.8.2.tar.gz --strip-components 1 dompdf-0.8.2/{lib,src,LICENSE.L
|
|||||||
rm dompdf-0.8.2.tar.gz
|
rm dompdf-0.8.2.tar.gz
|
||||||
mv LICENSE.LGPL LICENSE
|
mv LICENSE.LGPL LICENSE
|
||||||
|
|
||||||
curl https://codeload.github.com/PhenX/php-font-lib/tar.gz/0.4 -o php-font-lib-0.4.tar.gz
|
curl https://codeload.github.com/PhenX/php-font-lib/tar.gz/0.5.1 -o php-font-lib-0.5.1.tar.gz
|
||||||
mkdir -p lib/php-font-lib
|
mkdir -p lib/php-font-lib
|
||||||
tar xzf php-font-lib-0.4.tar.gz --strip-components 1 -C lib/php-font-lib php-font-lib-0.4/{src,LICENSE}
|
tar xzf php-font-lib-0.5.1.tar.gz --strip-components 1 -C lib/php-font-lib php-font-lib-0.5.1/{src,LICENSE}
|
||||||
rm php-font-lib-0.4.tar.gz
|
rm php-font-lib-0.5.1.tar.gz
|
||||||
|
|
||||||
curl https://codeload.github.com/PhenX/php-svg-lib/tar.gz/v0.3 -o php-svg-lib-0.3.tar.gz
|
curl https://codeload.github.com/PhenX/php-svg-lib/tar.gz/v0.3.2 -o php-svg-lib-0.3.2.tar.gz
|
||||||
mkdir -p lib/php-svg-lib
|
mkdir -p lib/php-svg-lib
|
||||||
tar xzf php-svg-lib-0.3.tar.gz --strip-components 1 -C lib/php-svg-lib php-svg-lib-0.3/src
|
tar xzf php-svg-lib-0.3.2.tar.gz --strip-components 1 -C lib/php-svg-lib php-svg-lib-0.3.2/src
|
||||||
rm php-svg-lib-0.3.tar.gz
|
rm php-svg-lib-0.3.2.tar.gz
|
||||||
|
@ -157,6 +157,10 @@ class BinaryStream {
|
|||||||
return ord($this->read(1));
|
return ord($this->read(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function readUInt8Many($count) {
|
||||||
|
return array_values(unpack("C*", $this->read($count)));
|
||||||
|
}
|
||||||
|
|
||||||
public function writeUInt8($data) {
|
public function writeUInt8($data) {
|
||||||
return $this->write(chr($data), 1);
|
return $this->write(chr($data), 1);
|
||||||
}
|
}
|
||||||
@ -171,6 +175,10 @@ class BinaryStream {
|
|||||||
return $v;
|
return $v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function readInt8Many($count) {
|
||||||
|
return array_values(unpack("c*", $this->read($count)));
|
||||||
|
}
|
||||||
|
|
||||||
public function writeInt8($data) {
|
public function writeInt8($data) {
|
||||||
if ($data < 0) {
|
if ($data < 0) {
|
||||||
$data += 0x100;
|
$data += 0x100;
|
||||||
@ -185,6 +193,10 @@ class BinaryStream {
|
|||||||
return $a["n"];
|
return $a["n"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function readUInt16Many($count) {
|
||||||
|
return array_values(unpack("n*", $this->read($count * 2)));
|
||||||
|
}
|
||||||
|
|
||||||
public function readUFWord() {
|
public function readUFWord() {
|
||||||
return $this->readUInt16();
|
return $this->readUInt16();
|
||||||
}
|
}
|
||||||
@ -198,7 +210,8 @@ class BinaryStream {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function readInt16() {
|
public function readInt16() {
|
||||||
$v = $this->readUInt16();
|
$a = unpack("nn", $this->read(2));
|
||||||
|
$v = $a["n"];
|
||||||
|
|
||||||
if ($v >= 0x8000) {
|
if ($v >= 0x8000) {
|
||||||
$v -= 0x10000;
|
$v -= 0x10000;
|
||||||
@ -207,6 +220,17 @@ class BinaryStream {
|
|||||||
return $v;
|
return $v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function readInt16Many($count) {
|
||||||
|
$vals = array_values(unpack("n*", $this->read($count * 2)));
|
||||||
|
foreach ($vals as &$v) {
|
||||||
|
if ($v >= 0x8000) {
|
||||||
|
$v -= 0x10000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $vals;
|
||||||
|
}
|
||||||
|
|
||||||
public function readFWord() {
|
public function readFWord() {
|
||||||
return $this->readInt16();
|
return $this->readInt16();
|
||||||
}
|
}
|
||||||
@ -251,6 +275,13 @@ class BinaryStream {
|
|||||||
$this->readUInt32(); // ignored
|
$this->readUInt32(); // ignored
|
||||||
$date = $this->readUInt32() - 2082844800;
|
$date = $this->readUInt32() - 2082844800;
|
||||||
|
|
||||||
|
# PHP_INT_MIN isn't defined in PHP < 7.0
|
||||||
|
$php_int_min = defined("PHP_INT_MIN") ? PHP_INT_MIN : ~PHP_INT_MAX;
|
||||||
|
|
||||||
|
if (is_string($date) || $date > PHP_INT_MAX || $date < $php_int_min) {
|
||||||
|
$date = 0;
|
||||||
|
}
|
||||||
|
|
||||||
return strftime("%Y-%m-%d %H:%M:%S", $date);
|
return strftime("%Y-%m-%d %H:%M:%S", $date);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -319,6 +350,18 @@ class BinaryStream {
|
|||||||
if ($type[0] == self::char) {
|
if ($type[0] == self::char) {
|
||||||
return $this->read($type[1]);
|
return $this->read($type[1]);
|
||||||
}
|
}
|
||||||
|
if ($type[0] == self::uint16) {
|
||||||
|
return $this->readUInt16Many($type[1]);
|
||||||
|
}
|
||||||
|
if ($type[0] == self::int16) {
|
||||||
|
return $this->readInt16Many($type[1]);
|
||||||
|
}
|
||||||
|
if ($type[0] == self::uint8) {
|
||||||
|
return $this->readUInt8Many($type[1]);
|
||||||
|
}
|
||||||
|
if ($type[0] == self::int8) {
|
||||||
|
return $this->readInt8Many($type[1]);
|
||||||
|
}
|
||||||
|
|
||||||
$ret = array();
|
$ret = array();
|
||||||
for ($i = 0; $i < $type[1]; $i++) {
|
for ($i = 0; $i < $type[1]; $i++) {
|
||||||
@ -376,8 +419,10 @@ class BinaryStream {
|
|||||||
|
|
||||||
$ret = 0;
|
$ret = 0;
|
||||||
for ($i = 0; $i < $type[1]; $i++) {
|
for ($i = 0; $i < $type[1]; $i++) {
|
||||||
|
if (isset($data[$i])) {
|
||||||
$ret += $this->w($type[0], $data[$i]);
|
$ret += $this->w($type[0], $data[$i]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
11
library/vendor/dompdf/lib/php-font-lib/src/FontLib/Exception/FontNotFoundException.php
vendored
Normal file
11
library/vendor/dompdf/lib/php-font-lib/src/FontLib/Exception/FontNotFoundException.php
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace FontLib\Exception;
|
||||||
|
|
||||||
|
class FontNotFoundException extends \Exception
|
||||||
|
{
|
||||||
|
public function __construct($fontPath)
|
||||||
|
{
|
||||||
|
$this->message = 'Font not found in: ' . $fontPath;
|
||||||
|
}
|
||||||
|
}
|
@ -8,6 +8,8 @@
|
|||||||
|
|
||||||
namespace FontLib;
|
namespace FontLib;
|
||||||
|
|
||||||
|
use FontLib\Exception\FontNotFoundException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generic font file.
|
* Generic font file.
|
||||||
*
|
*
|
||||||
@ -22,6 +24,10 @@ class Font {
|
|||||||
* @return TrueType\File|null $file
|
* @return TrueType\File|null $file
|
||||||
*/
|
*/
|
||||||
public static function load($file) {
|
public static function load($file) {
|
||||||
|
if(!file_exists($file)){
|
||||||
|
throw new FontNotFoundException($file);
|
||||||
|
}
|
||||||
|
|
||||||
$header = file_get_contents($file, false, null, null, 4);
|
$header = file_get_contents($file, false, null, null, 4);
|
||||||
$class = null;
|
$class = null;
|
||||||
|
|
||||||
|
@ -42,8 +42,7 @@ class Outline extends BinaryStream {
|
|||||||
*
|
*
|
||||||
* @return Outline
|
* @return Outline
|
||||||
*/
|
*/
|
||||||
static function init(glyf $table, $offset, $size) {
|
static function init(glyf $table, $offset, $size, BinaryStream $font) {
|
||||||
$font = $table->getFont();
|
|
||||||
$font->seek($offset);
|
$font->seek($offset);
|
||||||
|
|
||||||
if ($font->readInt16() > -1) {
|
if ($font->readInt16() > -1) {
|
||||||
@ -55,7 +54,7 @@ class Outline extends BinaryStream {
|
|||||||
$glyph = new OutlineComposite($table, $offset, $size);
|
$glyph = new OutlineComposite($table, $offset, $size);
|
||||||
}
|
}
|
||||||
|
|
||||||
$glyph->parse();
|
$glyph->parse($font);
|
||||||
|
|
||||||
return $glyph;
|
return $glyph;
|
||||||
}
|
}
|
||||||
@ -73,8 +72,7 @@ class Outline extends BinaryStream {
|
|||||||
$this->size = $size;
|
$this->size = $size;
|
||||||
}
|
}
|
||||||
|
|
||||||
function parse() {
|
function parse(BinaryStream $font) {
|
||||||
$font = $this->getFont();
|
|
||||||
$font->seek($this->offset);
|
$font->seek($this->offset);
|
||||||
|
|
||||||
if (!$this->size) {
|
if (!$this->size) {
|
||||||
|
@ -41,8 +41,11 @@ class OutlineComposite extends Outline {
|
|||||||
$glyphIDs[] = $_component->glyphIndex;
|
$glyphIDs[] = $_component->glyphIndex;
|
||||||
|
|
||||||
$_glyph = $this->table->data[$_component->glyphIndex];
|
$_glyph = $this->table->data[$_component->glyphIndex];
|
||||||
|
|
||||||
|
if ($_glyph !== $this) {
|
||||||
$glyphIDs = array_merge($glyphIDs, $_glyph->getGlyphIDs());
|
$glyphIDs = array_merge($glyphIDs, $_glyph->getGlyphIDs());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $glyphIDs;
|
return $glyphIDs;
|
||||||
}
|
}
|
||||||
@ -224,11 +227,15 @@ class OutlineComposite extends Outline {
|
|||||||
$glyphs = $glyph_data->data;
|
$glyphs = $glyph_data->data;
|
||||||
|
|
||||||
foreach ($this->components as $component) {
|
foreach ($this->components as $component) {
|
||||||
|
$_glyph = $glyphs[$component->glyphIndex];
|
||||||
|
|
||||||
|
if ($_glyph !== $this) {
|
||||||
$contours[] = array(
|
$contours[] = array(
|
||||||
"contours" => $glyphs[$component->glyphIndex]->getSVGContours(),
|
"contours" => $_glyph->getSVGContours(),
|
||||||
"transform" => $component->getMatrix(),
|
"transform" => $component->getMatrix(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $contours;
|
return $contours;
|
||||||
}
|
}
|
||||||
|
@ -35,6 +35,12 @@ class cmap extends Table {
|
|||||||
"rangeShift" => self::uint16,
|
"rangeShift" => self::uint16,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
private static $subtable_v12_format = array(
|
||||||
|
"length" => self::uint32,
|
||||||
|
"language" => self::uint32,
|
||||||
|
"ngroups" => self::uint32
|
||||||
|
);
|
||||||
|
|
||||||
protected function _parse() {
|
protected function _parse() {
|
||||||
$font = $this->getFont();
|
$font = $this->getFont();
|
||||||
|
|
||||||
@ -46,6 +52,7 @@ class cmap extends Table {
|
|||||||
for ($i = 0; $i < $data["numberSubtables"]; $i++) {
|
for ($i = 0; $i < $data["numberSubtables"]; $i++) {
|
||||||
$subtables[] = $font->unpack(self::$subtable_header_format);
|
$subtables[] = $font->unpack(self::$subtable_header_format);
|
||||||
}
|
}
|
||||||
|
|
||||||
$data["subtables"] = $subtables;
|
$data["subtables"] = $subtables;
|
||||||
|
|
||||||
foreach ($data["subtables"] as $i => &$subtable) {
|
foreach ($data["subtables"] as $i => &$subtable) {
|
||||||
@ -53,26 +60,58 @@ class cmap extends Table {
|
|||||||
|
|
||||||
$subtable["format"] = $font->readUInt16();
|
$subtable["format"] = $font->readUInt16();
|
||||||
|
|
||||||
// @todo Only CMAP version 4
|
// @todo Only CMAP version 4 and 12
|
||||||
if ($subtable["format"] != 4) {
|
if (($subtable["format"] != 4) && ($subtable["format"] != 12)) {
|
||||||
unset($data["subtables"][$i]);
|
unset($data["subtables"][$i]);
|
||||||
$data["numberSubtables"]--;
|
$data["numberSubtables"]--;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($subtable["format"] == 12) {
|
||||||
|
|
||||||
|
$font->readUInt16();
|
||||||
|
|
||||||
|
$subtable += $font->unpack(self::$subtable_v12_format);
|
||||||
|
|
||||||
|
$glyphIndexArray = array();
|
||||||
|
$endCodes = array();
|
||||||
|
$startCodes = array();
|
||||||
|
|
||||||
|
for ($p = 0; $p < $subtable['ngroups']; $p++) {
|
||||||
|
|
||||||
|
$startCode = $startCodes[] = $font->readUInt32();
|
||||||
|
$endCode = $endCodes[] = $font->readUInt32();
|
||||||
|
$startGlyphCode = $font->readUInt32();
|
||||||
|
|
||||||
|
for ($c = $startCode; $c <= $endCode; $c++) {
|
||||||
|
$glyphIndexArray[$c] = $startGlyphCode;
|
||||||
|
$startGlyphCode++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$subtable += array(
|
||||||
|
"startCode" => $startCodes,
|
||||||
|
"endCode" => $endCodes,
|
||||||
|
"glyphIndexArray" => $glyphIndexArray,
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
else if ($subtable["format"] == 4) {
|
||||||
|
|
||||||
$subtable += $font->unpack(self::$subtable_v4_format);
|
$subtable += $font->unpack(self::$subtable_v4_format);
|
||||||
|
|
||||||
$segCount = $subtable["segCountX2"] / 2;
|
$segCount = $subtable["segCountX2"] / 2;
|
||||||
$subtable["segCount"] = $segCount;
|
$subtable["segCount"] = $segCount;
|
||||||
|
|
||||||
$endCode = $font->r(array(self::uint16, $segCount));
|
$endCode = $font->readUInt16Many($segCount);
|
||||||
|
|
||||||
$font->readUInt16(); // reservedPad
|
$font->readUInt16(); // reservedPad
|
||||||
|
|
||||||
$startCode = $font->r(array(self::uint16, $segCount));
|
$startCode = $font->readUInt16Many($segCount);
|
||||||
$idDelta = $font->r(array(self::int16, $segCount));
|
$idDelta = $font->readInt16Many($segCount);
|
||||||
|
|
||||||
$ro_start = $font->pos();
|
$ro_start = $font->pos();
|
||||||
$idRangeOffset = $font->r(array(self::uint16, $segCount));
|
$idRangeOffset = $font->readUInt16Many($segCount);
|
||||||
|
|
||||||
$glyphIndexArray = array();
|
$glyphIndexArray = array();
|
||||||
for ($i = 0; $i < $segCount; $i++) {
|
for ($i = 0; $i < $segCount; $i++) {
|
||||||
@ -115,6 +154,7 @@ class cmap extends Table {
|
|||||||
"glyphIndexArray" => $glyphIndexArray,
|
"glyphIndexArray" => $glyphIndexArray,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$this->data = $data;
|
$this->data = $data;
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ class glyf extends Table {
|
|||||||
foreach ($real_loca as $gid => $location) {
|
foreach ($real_loca as $gid => $location) {
|
||||||
$_offset = $offset + $loca[$gid];
|
$_offset = $offset + $loca[$gid];
|
||||||
$_size = $loca[$gid + 1] - $loca[$gid];
|
$_size = $loca[$gid + 1] - $loca[$gid];
|
||||||
$data[$gid] = Outline::init($this, $_offset, $_size);
|
$data[$gid] = Outline::init($this, $_offset, $_size, $font);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->data = $data;
|
$this->data = $data;
|
||||||
|
@ -25,9 +25,12 @@ class hmtx extends Table {
|
|||||||
$font->seek($offset);
|
$font->seek($offset);
|
||||||
|
|
||||||
$data = array();
|
$data = array();
|
||||||
for ($gid = 0; $gid < $numOfLongHorMetrics; $gid++) {
|
$metrics = $font->readUInt16Many($numOfLongHorMetrics * 2);
|
||||||
$advanceWidth = $font->readUInt16();
|
for ($gid = 0, $mid = 0; $gid < $numOfLongHorMetrics; $gid++) {
|
||||||
$leftSideBearing = $font->readUInt16();
|
$advanceWidth = isset($metrics[$mid]) ? $metrics[$mid] : 0;
|
||||||
|
$mid += 1;
|
||||||
|
$leftSideBearing = isset($metrics[$mid]) ? $metrics[$mid] : 0;
|
||||||
|
$mid += 1;
|
||||||
$data[$gid] = array($advanceWidth, $leftSideBearing);
|
$data[$gid] = array($advanceWidth, $leftSideBearing);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,10 +44,15 @@ class kern extends Table {
|
|||||||
$pairs = array();
|
$pairs = array();
|
||||||
$tree = array();
|
$tree = array();
|
||||||
|
|
||||||
for ($i = 0; $i < $subtable["nPairs"]; $i++) {
|
$values = $font->readUInt16Many($subtable["nPairs"] * 3);
|
||||||
$left = $font->readUInt16();
|
for ($i = 0, $idx = 0; $i < $subtable["nPairs"]; $i++) {
|
||||||
$right = $font->readUInt16();
|
$left = $values[$idx++];
|
||||||
$value = $font->readInt16();
|
$right = $values[$idx++];
|
||||||
|
$value = $values[$idx++];
|
||||||
|
|
||||||
|
if ($value >= 0x8000) {
|
||||||
|
$value -= 0x10000;
|
||||||
|
}
|
||||||
|
|
||||||
$pairs[] = array(
|
$pairs[] = array(
|
||||||
"left" => $left,
|
"left" => $left,
|
||||||
|
@ -32,7 +32,7 @@ class loca extends Table {
|
|||||||
$loc = unpack("n*", $d);
|
$loc = unpack("n*", $d);
|
||||||
|
|
||||||
for ($i = 0; $i <= $numGlyphs; $i++) {
|
for ($i = 0; $i <= $numGlyphs; $i++) {
|
||||||
$data[] = $loc[$i + 1] * 2;
|
$data[] = isset($loc[$i + 1]) ? $loc[$i + 1] * 2 : 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ class loca extends Table {
|
|||||||
$loc = unpack("N*", $d);
|
$loc = unpack("N*", $d);
|
||||||
|
|
||||||
for ($i = 0; $i <= $numGlyphs; $i++) {
|
for ($i = 0; $i <= $numGlyphs; $i++) {
|
||||||
$data[] = $loc[$i + 1];
|
$data[] = isset($loc[$i + 1]) ? $loc[$i + 1] : 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ class name extends Table {
|
|||||||
3 => "Microsoft",
|
3 => "Microsoft",
|
||||||
);
|
);
|
||||||
|
|
||||||
static $plaformSpecific = array(
|
static $platformSpecific = array(
|
||||||
// Unicode
|
// Unicode
|
||||||
0 => array(
|
0 => array(
|
||||||
0 => "Default semantics",
|
0 => "Default semantics",
|
||||||
|
@ -42,10 +42,7 @@ class post extends Table {
|
|||||||
case 2:
|
case 2:
|
||||||
$data["numberOfGlyphs"] = $font->readUInt16();
|
$data["numberOfGlyphs"] = $font->readUInt16();
|
||||||
|
|
||||||
$glyphNameIndex = array();
|
$glyphNameIndex = $font->readUInt16Many($data["numberOfGlyphs"]);
|
||||||
for ($i = 0; $i < $data["numberOfGlyphs"]; $i++) {
|
|
||||||
$glyphNameIndex[] = $font->readUInt16();
|
|
||||||
}
|
|
||||||
|
|
||||||
$data["glyphNameIndex"] = $glyphNameIndex;
|
$data["glyphNameIndex"] = $glyphNameIndex;
|
||||||
|
|
||||||
|
@ -305,7 +305,7 @@ class File extends BinaryStream {
|
|||||||
|
|
||||||
$class = "FontLib\\Table\\Type\\$name_canon";
|
$class = "FontLib\\Table\\Type\\$name_canon";
|
||||||
|
|
||||||
if (!isset($this->directory[$tag]) || !class_exists($class)) {
|
if (!isset($this->directory[$tag]) || !@class_exists($class)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* @package php-svg-lib
|
* @package php-svg-lib
|
||||||
* @link http://github.com/PhenX/php-svg-lib
|
* @link http://github.com/PhenX/php-svg-lib
|
||||||
* @author Fabien Ménager <fabien.menager@gmail.com>
|
* @author Fabien Ménager <fabien.menager@gmail.com>
|
||||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
* @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Svg;
|
namespace Svg;
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
/**
|
/**
|
||||||
* @package php-svg-lib
|
* @package php-svg-lib
|
||||||
* @link http://github.com/PhenX/php-svg-lib
|
* @link http://github.com/PhenX/php-svg-lib
|
||||||
* @author Fabien Ménager <fabien.menager@gmail.com>
|
* @author Fabien Ménager <fabien.menager@gmail.com>
|
||||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
* @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Svg;
|
namespace Svg;
|
||||||
@ -333,6 +333,9 @@ class Document extends AbstractTag
|
|||||||
case 'text':
|
case 'text':
|
||||||
$tag = new Text($this, $name);
|
$tag = new Text($this, $name);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'desc':
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($tag) {
|
if ($tag) {
|
||||||
@ -350,8 +353,6 @@ class Document extends AbstractTag
|
|||||||
$this->stack[] = $tag;
|
$this->stack[] = $tag;
|
||||||
|
|
||||||
$tag->handle($attributes);
|
$tag->handle($attributes);
|
||||||
} else {
|
|
||||||
echo "Unknown: '$name'\n";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* @package php-svg-lib
|
* @package php-svg-lib
|
||||||
* @link http://github.com/PhenX/php-svg-lib
|
* @link http://github.com/PhenX/php-svg-lib
|
||||||
* @author Fabien Ménager <fabien.menager@gmail.com>
|
* @author Fabien Ménager <fabien.menager@gmail.com>
|
||||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
* @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Svg\Gradient;
|
namespace Svg\Gradient;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* @package php-svg-lib
|
* @package php-svg-lib
|
||||||
* @link http://github.com/PhenX/php-svg-lib
|
* @link http://github.com/PhenX/php-svg-lib
|
||||||
* @author Fabien M<EFBFBD>nager <fabien.menager@gmail.com>
|
* @author Fabien M<EFBFBD>nager <fabien.menager@gmail.com>
|
||||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
* @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Svg;
|
namespace Svg;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* @package php-svg-lib
|
* @package php-svg-lib
|
||||||
* @link http://github.com/PhenX/php-svg-lib
|
* @link http://github.com/PhenX/php-svg-lib
|
||||||
* @author Fabien M<EFBFBD>nager <fabien.menager@gmail.com>
|
* @author Fabien M<EFBFBD>nager <fabien.menager@gmail.com>
|
||||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
* @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Svg\Surface;
|
namespace Svg\Surface;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* @package php-svg-lib
|
* @package php-svg-lib
|
||||||
* @link http://github.com/PhenX/php-svg-lib
|
* @link http://github.com/PhenX/php-svg-lib
|
||||||
* @author Fabien M<EFBFBD>nager <fabien.menager@gmail.com>
|
* @author Fabien M<EFBFBD>nager <fabien.menager@gmail.com>
|
||||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
* @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Svg\Surface;
|
namespace Svg\Surface;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* @package php-svg-lib
|
* @package php-svg-lib
|
||||||
* @link http://github.com/PhenX/php-svg-lib
|
* @link http://github.com/PhenX/php-svg-lib
|
||||||
* @author Fabien M<EFBFBD>nager <fabien.menager@gmail.com>
|
* @author Fabien M<EFBFBD>nager <fabien.menager@gmail.com>
|
||||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
* @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Svg\Surface;
|
namespace Svg\Surface;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* @package php-svg-lib
|
* @package php-svg-lib
|
||||||
* @link http://github.com/PhenX/php-svg-lib
|
* @link http://github.com/PhenX/php-svg-lib
|
||||||
* @author Fabien M<EFBFBD>nager <fabien.menager@gmail.com>
|
* @author Fabien M<EFBFBD>nager <fabien.menager@gmail.com>
|
||||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
* @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Svg\Surface;
|
namespace Svg\Surface;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* @package php-svg-lib
|
* @package php-svg-lib
|
||||||
* @link http://github.com/PhenX/php-svg-lib
|
* @link http://github.com/PhenX/php-svg-lib
|
||||||
* @author Fabien Ménager <fabien.menager@gmail.com>
|
* @author Fabien Ménager <fabien.menager@gmail.com>
|
||||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
* @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Svg\Tag;
|
namespace Svg\Tag;
|
||||||
@ -21,7 +21,7 @@ abstract class AbstractTag
|
|||||||
/** @var Style */
|
/** @var Style */
|
||||||
protected $style;
|
protected $style;
|
||||||
|
|
||||||
protected $attributes;
|
protected $attributes = array();
|
||||||
|
|
||||||
protected $hasShape = true;
|
protected $hasShape = true;
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* @package php-svg-lib
|
* @package php-svg-lib
|
||||||
* @link http://github.com/PhenX/php-svg-lib
|
* @link http://github.com/PhenX/php-svg-lib
|
||||||
* @author Fabien Ménager <fabien.menager@gmail.com>
|
* @author Fabien Ménager <fabien.menager@gmail.com>
|
||||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
* @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Svg\Tag;
|
namespace Svg\Tag;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* @package php-svg-lib
|
* @package php-svg-lib
|
||||||
* @link http://github.com/PhenX/php-svg-lib
|
* @link http://github.com/PhenX/php-svg-lib
|
||||||
* @author Fabien Ménager <fabien.menager@gmail.com>
|
* @author Fabien Ménager <fabien.menager@gmail.com>
|
||||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
* @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Svg\Tag;
|
namespace Svg\Tag;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* @package php-svg-lib
|
* @package php-svg-lib
|
||||||
* @link http://github.com/PhenX/php-svg-lib
|
* @link http://github.com/PhenX/php-svg-lib
|
||||||
* @author Fabien Ménager <fabien.menager@gmail.com>
|
* @author Fabien Ménager <fabien.menager@gmail.com>
|
||||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
* @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Svg\Tag;
|
namespace Svg\Tag;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* @package php-svg-lib
|
* @package php-svg-lib
|
||||||
* @link http://github.com/PhenX/php-svg-lib
|
* @link http://github.com/PhenX/php-svg-lib
|
||||||
* @author Fabien Ménager <fabien.menager@gmail.com>
|
* @author Fabien Ménager <fabien.menager@gmail.com>
|
||||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
* @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Svg\Tag;
|
namespace Svg\Tag;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* @package php-svg-lib
|
* @package php-svg-lib
|
||||||
* @link http://github.com/PhenX/php-svg-lib
|
* @link http://github.com/PhenX/php-svg-lib
|
||||||
* @author Fabien Ménager <fabien.menager@gmail.com>
|
* @author Fabien Ménager <fabien.menager@gmail.com>
|
||||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
* @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Svg\Tag;
|
namespace Svg\Tag;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* @package php-svg-lib
|
* @package php-svg-lib
|
||||||
* @link http://github.com/PhenX/php-svg-lib
|
* @link http://github.com/PhenX/php-svg-lib
|
||||||
* @author Fabien Ménager <fabien.menager@gmail.com>
|
* @author Fabien Ménager <fabien.menager@gmail.com>
|
||||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
* @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Svg\Tag;
|
namespace Svg\Tag;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* @package php-svg-lib
|
* @package php-svg-lib
|
||||||
* @link http://github.com/PhenX/php-svg-lib
|
* @link http://github.com/PhenX/php-svg-lib
|
||||||
* @author Fabien Ménager <fabien.menager@gmail.com>
|
* @author Fabien Ménager <fabien.menager@gmail.com>
|
||||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
* @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Svg\Tag;
|
namespace Svg\Tag;
|
||||||
|
@ -3,13 +3,13 @@
|
|||||||
* @package php-svg-lib
|
* @package php-svg-lib
|
||||||
* @link http://github.com/PhenX/php-svg-lib
|
* @link http://github.com/PhenX/php-svg-lib
|
||||||
* @author Fabien Ménager <fabien.menager@gmail.com>
|
* @author Fabien Ménager <fabien.menager@gmail.com>
|
||||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
* @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Svg\Tag;
|
namespace Svg\Tag;
|
||||||
|
|
||||||
|
|
||||||
use Svg\Gradient\Stop;
|
use Svg\Gradient;
|
||||||
use Svg\Style;
|
use Svg\Style;
|
||||||
|
|
||||||
class LinearGradient extends AbstractTag
|
class LinearGradient extends AbstractTag
|
||||||
@ -19,7 +19,7 @@ class LinearGradient extends AbstractTag
|
|||||||
protected $x2;
|
protected $x2;
|
||||||
protected $y2;
|
protected $y2;
|
||||||
|
|
||||||
/** @var Stop[] */
|
/** @var Gradient\Stop[] */
|
||||||
protected $stops = array();
|
protected $stops = array();
|
||||||
|
|
||||||
public function start($attributes)
|
public function start($attributes)
|
||||||
@ -47,7 +47,7 @@ class LinearGradient extends AbstractTag
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$_stop = new Stop();
|
$_stop = new Gradient\Stop();
|
||||||
$_attributes = $_child->attributes;
|
$_attributes = $_child->attributes;
|
||||||
|
|
||||||
// Style
|
// Style
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* @package php-svg-lib
|
* @package php-svg-lib
|
||||||
* @link http://github.com/PhenX/php-svg-lib
|
* @link http://github.com/PhenX/php-svg-lib
|
||||||
* @author Fabien Ménager <fabien.menager@gmail.com>
|
* @author Fabien Ménager <fabien.menager@gmail.com>
|
||||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
* @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Svg\Tag;
|
namespace Svg\Tag;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* @package php-svg-lib
|
* @package php-svg-lib
|
||||||
* @link http://github.com/PhenX/php-svg-lib
|
* @link http://github.com/PhenX/php-svg-lib
|
||||||
* @author Fabien Ménager <fabien.menager@gmail.com>
|
* @author Fabien Ménager <fabien.menager@gmail.com>
|
||||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
* @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Svg\Tag;
|
namespace Svg\Tag;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* @package php-svg-lib
|
* @package php-svg-lib
|
||||||
* @link http://github.com/PhenX/php-svg-lib
|
* @link http://github.com/PhenX/php-svg-lib
|
||||||
* @author Fabien Ménager <fabien.menager@gmail.com>
|
* @author Fabien Ménager <fabien.menager@gmail.com>
|
||||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
* @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Svg\Tag;
|
namespace Svg\Tag;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* @package php-svg-lib
|
* @package php-svg-lib
|
||||||
* @link http://github.com/PhenX/php-svg-lib
|
* @link http://github.com/PhenX/php-svg-lib
|
||||||
* @author Fabien Ménager <fabien.menager@gmail.com>
|
* @author Fabien Ménager <fabien.menager@gmail.com>
|
||||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
* @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Svg\Tag;
|
namespace Svg\Tag;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* @package php-svg-lib
|
* @package php-svg-lib
|
||||||
* @link http://github.com/PhenX/php-svg-lib
|
* @link http://github.com/PhenX/php-svg-lib
|
||||||
* @author Fabien Ménager <fabien.menager@gmail.com>
|
* @author Fabien Ménager <fabien.menager@gmail.com>
|
||||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
* @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Svg\Tag;
|
namespace Svg\Tag;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* @package php-svg-lib
|
* @package php-svg-lib
|
||||||
* @link http://github.com/PhenX/php-svg-lib
|
* @link http://github.com/PhenX/php-svg-lib
|
||||||
* @author Fabien Ménager <fabien.menager@gmail.com>
|
* @author Fabien Ménager <fabien.menager@gmail.com>
|
||||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
* @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Svg\Tag;
|
namespace Svg\Tag;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* @package php-svg-lib
|
* @package php-svg-lib
|
||||||
* @link http://github.com/PhenX/php-svg-lib
|
* @link http://github.com/PhenX/php-svg-lib
|
||||||
* @author Fabien Ménager <fabien.menager@gmail.com>
|
* @author Fabien Ménager <fabien.menager@gmail.com>
|
||||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
* @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Svg\Tag;
|
namespace Svg\Tag;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* @package php-svg-lib
|
* @package php-svg-lib
|
||||||
* @link http://github.com/PhenX/php-svg-lib
|
* @link http://github.com/PhenX/php-svg-lib
|
||||||
* @author Fabien Ménager <fabien.menager@gmail.com>
|
* @author Fabien Ménager <fabien.menager@gmail.com>
|
||||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
* @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Svg\Tag;
|
namespace Svg\Tag;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* @package php-svg-lib
|
* @package php-svg-lib
|
||||||
* @link http://github.com/PhenX/php-svg-lib
|
* @link http://github.com/PhenX/php-svg-lib
|
||||||
* @author Fabien Ménager <fabien.menager@gmail.com>
|
* @author Fabien Ménager <fabien.menager@gmail.com>
|
||||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
* @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Svg\Tag;
|
namespace Svg\Tag;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* @package php-svg-lib
|
* @package php-svg-lib
|
||||||
* @link http://github.com/PhenX/php-svg-lib
|
* @link http://github.com/PhenX/php-svg-lib
|
||||||
* @author Fabien M<EFBFBD>nager <fabien.menager@gmail.com>
|
* @author Fabien M<EFBFBD>nager <fabien.menager@gmail.com>
|
||||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
* @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Svg\Tag;
|
namespace Svg\Tag;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* @package php-svg-lib
|
* @package php-svg-lib
|
||||||
* @link http://github.com/PhenX/php-svg-lib
|
* @link http://github.com/PhenX/php-svg-lib
|
||||||
* @author Fabien Ménager <fabien.menager@gmail.com>
|
* @author Fabien Ménager <fabien.menager@gmail.com>
|
||||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
* @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
spl_autoload_register(function($class) {
|
spl_autoload_register(function($class) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user