svg-ultralight 0.45.2__tar.gz → 0.45.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of svg-ultralight might be problematic. Click here for more details.
- {svg_ultralight-0.45.2/src/svg_ultralight.egg-info → svg_ultralight-0.45.3}/PKG-INFO +1 -1
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/dev-requirements.txt +2 -2
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/pyproject.toml +2 -2
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight/transformations.py +4 -3
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3/src/svg_ultralight.egg-info}/PKG-INFO +1 -1
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight.egg-info/SOURCES.txt +1 -0
- svg_ultralight-0.45.3/tests/test_bound_element.py +31 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/.gitignore +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/.pre-commit-config.yaml +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/README.md +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/experiments/encode_fonts3.txt +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/experiments/font_css.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/setup.cfg +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight/__init__.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight/animate.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight/attrib_hints.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight/bounding_boxes/__init__.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight/bounding_boxes/bound_helpers.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight/bounding_boxes/padded_text_initializers.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight/bounding_boxes/supports_bounds.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight/bounding_boxes/type_bound_collection.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight/bounding_boxes/type_bound_element.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight/bounding_boxes/type_bounding_box.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight/bounding_boxes/type_padded_text.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight/constructors/__init__.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight/constructors/new_element.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight/font_tools/__init__.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight/font_tools/comp_results.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight/font_tools/font_info.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight/font_tools/globs.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight/image_ops.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight/inkscape.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight/layout.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight/main.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight/metadata.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight/nsmap.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight/py.typed +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight/query.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight/root_elements.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight/string_conversion.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight/strings/__init__.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight/strings/svg_strings.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight/unit_conversion.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight.egg-info/dependency_links.txt +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight.egg-info/requires.txt +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight.egg-info/top_level.txt +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/tests/__init__.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/tests/conftest.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/tests/resources/arrow.svg +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/tests/test_bounding.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/tests/test_inkscape.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/tests/test_layout.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/tests/test_matrices.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/tests/test_metadata.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/tests/test_new_element.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/tests/test_padded_text_initializers.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/tests/test_padding.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/tests/test_queries.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/tests/test_root_elements.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/tests/test_string_conversion.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/tests/test_svg_ultralight.py +0 -0
- {svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/tox.ini +0 -0
|
@@ -91,7 +91,7 @@ questionary==2.1.0
|
|
|
91
91
|
# via commitizen
|
|
92
92
|
soupsieve==2.7
|
|
93
93
|
# via beautifulsoup4
|
|
94
|
-
svg-path-data==0.3.
|
|
94
|
+
svg-path-data==0.3.2
|
|
95
95
|
# via svg-ultralight (pyproject.toml)
|
|
96
96
|
termcolor==3.1.0
|
|
97
97
|
# via commitizen
|
|
@@ -99,7 +99,7 @@ tomlkit==0.13.3
|
|
|
99
99
|
# via commitizen
|
|
100
100
|
tox==4.27.0
|
|
101
101
|
# via svg-ultralight (pyproject.toml)
|
|
102
|
-
types-html5lib==1.1.11.
|
|
102
|
+
types-html5lib==1.1.11.20250708
|
|
103
103
|
# via types-lxml
|
|
104
104
|
types-lxml==2025.3.30
|
|
105
105
|
# via svg-ultralight (pyproject.toml)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "svg-ultralight"
|
|
3
|
-
version = "0.45.
|
|
3
|
+
version = "0.45.3"
|
|
4
4
|
description = "a sensible way to create svg files with Python"
|
|
5
5
|
authors = [{ name = "Shay Hill", email = "shay_public@hotmail.com" }]
|
|
6
6
|
license = { text = "MIT" }
|
|
@@ -53,7 +53,7 @@ convention = "pep257"
|
|
|
53
53
|
|
|
54
54
|
[tool.commitizen]
|
|
55
55
|
name = "cz_conventional_commits"
|
|
56
|
-
version = "0.45.
|
|
56
|
+
version = "0.45.3"
|
|
57
57
|
tag_format = "$version"
|
|
58
58
|
version_files = ["pyproject.toml:^version"]
|
|
59
59
|
annotated_tag = true
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
from __future__ import annotations
|
|
8
8
|
|
|
9
|
+
import numbers
|
|
9
10
|
import re
|
|
10
11
|
from contextlib import suppress
|
|
11
12
|
from typing import TYPE_CHECKING, cast
|
|
@@ -116,16 +117,16 @@ def new_transformation_matrix(
|
|
|
116
117
|
"""
|
|
117
118
|
transformation = transformation or (1, 0, 0, 1, 0, 0)
|
|
118
119
|
|
|
119
|
-
if isinstance(scale, float):
|
|
120
|
+
if isinstance(scale, (float, int, numbers.Real)):
|
|
120
121
|
scale_x, scale_y = (scale, scale)
|
|
121
122
|
elif scale is None:
|
|
122
123
|
scale_x, scale_y = (1, 1)
|
|
123
124
|
else:
|
|
124
|
-
scale_x, scale_y =
|
|
125
|
+
scale_x, scale_y = scale
|
|
125
126
|
|
|
126
127
|
dx = dx or 0
|
|
127
128
|
dy = dy or 0
|
|
128
|
-
return mat_dot((scale_x, 0, 0, scale_y, dx, dy), transformation)
|
|
129
|
+
return mat_dot((float(scale_x), 0, 0, float(scale_y), dx, dy), transformation)
|
|
129
130
|
|
|
130
131
|
|
|
131
132
|
def transform_element(elem: EtreeElement, matrix: _Matrix) -> EtreeElement:
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"""Test methods for BoundElement instances.
|
|
2
|
+
|
|
3
|
+
:author: Shay Hill
|
|
4
|
+
:created: 2025-07-29
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from svg_ultralight.bounding_boxes.type_bounding_box import BoundingBox
|
|
8
|
+
|
|
9
|
+
class TestTransforms:
|
|
10
|
+
"""Test methods for BoundElement instances."""
|
|
11
|
+
|
|
12
|
+
def test_matrix(self) -> None:
|
|
13
|
+
"""Test the transform method."""
|
|
14
|
+
bbox = BoundingBox(0, 0, 100, 100)
|
|
15
|
+
bbox.transform(transformation=(1, 2, 3, 4, 5, 6))
|
|
16
|
+
assert bbox.transformation == (1, 2, 3, 4, 5, 6)
|
|
17
|
+
|
|
18
|
+
def test_scale_float(self) -> None:
|
|
19
|
+
"""Test the scale method with a float."""
|
|
20
|
+
bbox = BoundingBox(0, 0, 100, 100)
|
|
21
|
+
bbox.transform(scale=2.0)
|
|
22
|
+
assert bbox.transformation == (2.0, 0.0, 0.0, 2.0, 0.0, 0.0)
|
|
23
|
+
|
|
24
|
+
def test_scale_int(self) -> None:
|
|
25
|
+
"""Test the scale method with an int."""
|
|
26
|
+
bbox = BoundingBox(0, 0, 100, 100)
|
|
27
|
+
bbox.transform(scale=2)
|
|
28
|
+
assert bbox.transformation == (2.0, 0.0, 0.0, 2.0, 0.0, 0.0)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight/bounding_boxes/__init__.py
RENAMED
|
File without changes
|
{svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight/bounding_boxes/bound_helpers.py
RENAMED
|
File without changes
|
|
File without changes
|
{svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight/bounding_boxes/supports_bounds.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight/constructors/new_element.py
RENAMED
|
File without changes
|
|
File without changes
|
{svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight/font_tools/comp_results.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{svg_ultralight-0.45.2 → svg_ultralight-0.45.3}/src/svg_ultralight.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|