⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.184
Server IP:
65.21.180.239
Server:
Linux gowhm.eplangoweb.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.0.30
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
lib
/
mysqlsh
/
lib
/
python3.8
/
site-packages
/
svg
/
View File Name :
_types.py
from __future__ import annotations from dataclasses import dataclass from decimal import Decimal from typing import TYPE_CHECKING, Union if TYPE_CHECKING: from typing_extensions import Literal Number = Union[Decimal, float, int] @dataclass class Length: """ https://developer.mozilla.org/en-US/docs/Web/SVG/Content_type#length """ value: Number unit: Literal["em", "ex", "px", "pt", "pc", "cm", "mm", "in", "%"] def __str__(self) -> str: return f"{self.value}{self.unit}" @dataclass class PreserveAspectRatio: """ https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/preserveAspectRatio """ alignment: Literal[ "none", "xMinYMin", "xMidYMin", "xMaxYMin", "xMinYMid", "xMidYMid", "xMaxYMid", "xMinYMax", "xMidYMax", "xMaxYMax", ] = "xMidYMid" scale_type: Literal["meet", "slice"] = "meet" def __str__(self) -> str: return f"{self.alignment} {self.scale_type}" @dataclass class ViewBoxSpec: """ https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/viewBox """ min_x: Number min_y: Number width: Number height: Number def __str__(self) -> str: return f"{self.min_x} {self.min_y} {self.width} {self.height}"