Lines Matching refs:FetcherSvg

28 class FetcherSvg extends IFetcherLocalImage  class
95 public const COLOR_TYPE_STROKE_OUTLINE = FetcherSvg::STROKE_ATTRIBUTE;
138 private static function createSvgEmpty(): FetcherSvg
140 return new FetcherSvg();
145 public static function createSvgFromPath(WikiPath $path): FetcherSvg
156 public static function createSvgFromFetchUrl(Url $fetchUrl): FetcherSvg
166 * @return FetcherSvg
169 public static function createSvgFromMarkup(string $markup, string $name): FetcherSvg
176 * @return FetcherSvg
181 public static function createFromAttributes(TagAttributes $tagAttributes): FetcherSvg
183 $fetcher = FetcherSvg::createSvgEmpty();
206 return SiteConfig::getConfValue(FetcherSvg::CONF_SVG_OPTIMIZATION_ENABLE, 1);
227 * @return FetcherSvg
229 public function setRequestedOptimization($boolean): FetcherSvg
253 …$confNamespaceToKeeps = SiteConfig::getConfValue(FetcherSvg::CONF_OPTIMIZATION_NAMESPACES_TO_KEEP);
260 && in_array($namespaceUri, FetcherSvg::EDITOR_NAMESPACE)
292 $defaultValues = FetcherSvg::SVG_DEFAULT_ATTRIBUTES_VALUE;
306 …$attributeConfToDelete = SiteConfig::getConfValue(FetcherSvg::CONF_OPTIMIZATION_ATTRIBUTES_TO_DELE…
341 $viewBoxAttribute = $documentElement->getAttribute(FetcherSvg::VIEW_BOX);
387 …$elementsToDeleteConf = SiteConfig::getConfValue(FetcherSvg::CONF_OPTIMIZATION_ELEMENTS_TO_DELETE,…
399 …$elementsToDeleteIfEmptyConf = SiteConfig::getConfValue(FetcherSvg::CONF_OPTIMIZATION_ELEMENTS_TO_…
416 …$documentElement->removeAttributeNS(FetcherSvg::SVG_NAMESPACE_URI, FetcherSvg::SVG_NAMESPACE_PREFI…
575 $files[] = ClassUtility::getClassPath(FetcherSvg::class);
658 public function setRequestedColor(ColorRgb $color): FetcherSvg
679 public function setRequestedPreserveAspectRatio(string $preserveAspectRatio): FetcherSvg
708 * @return FetcherSvg
711 function setRequestedName(string $name): FetcherSvg
783 public function setPreserveStyle(bool $bool): FetcherSvg
814 private function setMarkup(string $markup, string $name): FetcherSvg
822 public function setRequestedType(string $requestedType): FetcherSvg
852 public function process(): FetcherSvg
928 case FetcherSvg::ICON_TYPE:
929 $requestedType = FetcherSvg::ICON_TYPE;
932 $requestedType = FetcherSvg::ILLUSTRATION_TYPE;
949 …if ($svgStructureType === FetcherSvg::ICON_TYPE && $requestedType === FetcherSvg::ILLUSTRATION_TYP…
1012 … $documentElement->setAttribute(FetcherSvg::VIEW_BOX, "$x $y $viewBoxWidth $viewBoxHeight");
1015 $viewBox = $documentElement->getAttribute(FetcherSvg::VIEW_BOX);
1018 …$documentElement->setAttribute(FetcherSvg::VIEW_BOX, "0 0 {$this->getIntrinsicWidth()} {$this->get…
1040 case FetcherSvg::ICON_TYPE:
1041 case FetcherSvg::TILE_TYPE:
1073 …$aspectRatio = SiteConfig::getConfValue(FetcherSvg::CONF_PRESERVE_ASPECT_RATIO_DEFAULT, "xMidYMid …
1132 case FetcherSvg::ICON_TYPE:
1133 case FetcherSvg::TILE_TYPE:
1146 $svgColorType = FetcherSvg::COLOR_TYPE_FILL_SOLID;
1147 if ($documentElement->hasAttribute(FetcherSvg::STROKE_ATTRIBUTE)) {
1148 $svgColorType = FetcherSvg::COLOR_TYPE_STROKE_OUTLINE;
1154 if ($svgColorType === FetcherSvg::COLOR_TYPE_FILL_SOLID) {
1193 $documentElement->setAttribute("fill", FetcherSvg::CURRENT_COLOR);
1229 if ($requestedType === FetcherSvg::ILLUSTRATION_TYPE) {
1259 case FetcherSvg::COLOR_TYPE_FILL_SOLID:
1265 if ($colorValue !== FetcherSvg::CURRENT_COLOR) {
1281 … $nodeElement->setAttribute("fill", FetcherSvg::CURRENT_COLOR);
1298 case FetcherSvg::COLOR_TYPE_STROKE_OUTLINE:
1300 … $documentElement->setAttribute(FetcherSvg::STROKE_ATTRIBUTE, $colorValue);
1302 if ($colorValue !== FetcherSvg::CURRENT_COLOR) {
1313 … $value = $nodeElement->getAttribute(FetcherSvg::STROKE_ATTRIBUTE);
1315 … $this->getXmlDocument()->removeAttributeValue(FetcherSvg::STROKE_ATTRIBUTE, $nodeElement);
1568 public function setRequestedZoom(float $zoomFactor): FetcherSvg
1574 public function setRequestedClass(string $value): FetcherSvg
1605 private function setIntrinsicHeight(): FetcherSvg
1607 …x = $this->getXmlDocument()->getDomDocument()->documentElement->getAttribute(FetcherSvg::VIEW_BOX);
1640 private function setIntrinsicWidth(): FetcherSvg
1642 $viewBox = $this->getXmlDom()->documentElement->getAttribute(FetcherSvg::VIEW_BOX);
1681 private function buildXmlDocumentIfNeeded(string $markup = null): FetcherSvg
1751 return FetcherSvg::ICON_TYPE;
1753 $svgStructureType = FetcherSvg::ILLUSTRATION_TYPE;
1772 if ($requestType === FetcherSvg::ICON_TYPE || $isInIconDirectory) {
1773 $svgStructureType = FetcherSvg::ICON_TYPE;
1803 case FetcherSvg::ICON_TYPE:
1807 $requestedType = FetcherSvg::ICON_TYPE;
1810 case FetcherSvg::TILE_TYPE:
1813 case FetcherSvg::ICON_TYPE:
1814 return FetcherSvg::DEFAULT_ICON_LENGTH;