drawlib 0.1.2__tar.gz → 0.1.4__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 drawlib might be problematic. Click here for more details.
- {drawlib-0.1.2 → drawlib-0.1.4}/PKG-INFO +11 -3
- {drawlib-0.1.2 → drawlib-0.1.4}/README.md +10 -2
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/__init__.py +1 -1
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/apis.py +7 -6
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/private/core/model.py +23 -0
- drawlib-0.1.4/drawlib/v0_1/private/core/theme.py +1993 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/private/core_canvas/base.py +1 -7
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/private/core_canvas/image.py +3 -1
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/private/core_canvas/line.py +20 -6
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/private/core_canvas/original_arrow.py +5 -3
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/private/core_canvas/original_polygon.py +73 -57
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/private/core_canvas/patches.py +59 -34
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/private/icons/phosphor.py +1564 -1539
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/private/icons/util.py +4 -2
- {drawlib-0.1.2 → drawlib-0.1.4}/pyproject.toml +1 -1
- drawlib-0.1.2/drawlib/v0_1/private/core/theme.py +0 -1042
- {drawlib-0.1.2 → drawlib-0.1.4}/LICENSE.txt +0 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/.pylintrc +0 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/__main__.py +0 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/apis.py +0 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/assets/__init__.py +0 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/assets/v0_1/__init__.py +0 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/assets/v0_1/fonticons/__init__.py +0 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/assets/v0_1/fonts/__init__.py +0 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/__init__.py +0 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/__main__.py +0 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/private/__init__.py +0 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/private/arg_validator.py +0 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/private/command.py +0 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/private/core/__init__.py +0 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/private/core/colors.py +0 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/private/core/dimage.py +0 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/private/core/fonts.py +0 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/private/core/model_validator.py +0 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/private/core/util.py +0 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/private/core_canvas/__init__.py +0 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/private/core_canvas/canvas.py +0 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/private/core_canvas/text.py +0 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/private/download.py +0 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/private/dutil.py +0 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/private/icons/__init__.py +0 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/private/logging.py +0 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/private/settings.py +0 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/private/smartarts/__init__.py +0 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/private/smartarts/cycle.py +0 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/private/smartarts/dsart.py +0 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/private/smartarts/groups.py +0 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/private/smartarts/pyramid.py +0 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/private/smartarts/sourcecode.py +0 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/private/smartarts/table.py +0 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/private/smartarts/tree.py +0 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/private/tools.py +0 -0
- {drawlib-0.1.2 → drawlib-0.1.4}/drawlib/v0_1/private/util.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: drawlib
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.4
|
|
4
4
|
Summary: Python drawing library. Illustration as Code.
|
|
5
5
|
Home-page: https://www.drawlib.com
|
|
6
6
|
Author: Yuichi Ito
|
|
@@ -35,6 +35,14 @@ Drawlib offers a range of basic drawing features, including:
|
|
|
35
35
|
|
|
36
36
|
All with a consistent syntax.
|
|
37
37
|
|
|
38
|
+
Here is a brief overview of the library's API design.
|
|
39
|
+
|
|
40
|
+

|
|
41
|
+
|
|
42
|
+
As you can see, the core drawing components rely on the same canvas and coordinate systems.
|
|
43
|
+
Styling for each component is slightly different but mostly similar.
|
|
44
|
+
If you require advanced use cases, many helper classes and functions can resolve the situation.
|
|
45
|
+
|
|
38
46
|
It's important to note that drawlib is a pure Python library. This means you can leverage the entire Python ecosystem, including:
|
|
39
47
|
|
|
40
48
|
- Accessing library help and code completion via IDEs.
|
|
@@ -51,13 +59,13 @@ Drawlib is optimized for drawing a large number of illustrations with a consiste
|
|
|
51
59
|
You can easily achieve this by creating a theme file (which is simply Python code) and importing it into your illustration codes (also Python code).
|
|
52
60
|
Here is a typical use case of drawlib.
|
|
53
61
|
|
|
54
|
-

|
|
55
63
|
|
|
56
64
|
We have provided examples of building Sphinx-based documentation with numerous drawlib images. If you're interested, please check out our documentation.
|
|
57
65
|
|
|
58
66
|
## Links
|
|
59
67
|
|
|
60
|
-
- [Documentation](https://www.drawlib.com)
|
|
68
|
+
- [Documentation](https://www.drawlib.com/docs/)
|
|
61
69
|
- [PyPI](https://pypi.org/project/drawlib/)
|
|
62
70
|
- [Code repository](https://github.com/yuichi110/drawlib)
|
|
63
71
|
- [Docs repository](https://github.com/yuichi110/drawlib_docs)
|
|
@@ -17,6 +17,14 @@ Drawlib offers a range of basic drawing features, including:
|
|
|
17
17
|
|
|
18
18
|
All with a consistent syntax.
|
|
19
19
|
|
|
20
|
+
Here is a brief overview of the library's API design.
|
|
21
|
+
|
|
22
|
+

|
|
23
|
+
|
|
24
|
+
As you can see, the core drawing components rely on the same canvas and coordinate systems.
|
|
25
|
+
Styling for each component is slightly different but mostly similar.
|
|
26
|
+
If you require advanced use cases, many helper classes and functions can resolve the situation.
|
|
27
|
+
|
|
20
28
|
It's important to note that drawlib is a pure Python library. This means you can leverage the entire Python ecosystem, including:
|
|
21
29
|
|
|
22
30
|
- Accessing library help and code completion via IDEs.
|
|
@@ -33,13 +41,13 @@ Drawlib is optimized for drawing a large number of illustrations with a consiste
|
|
|
33
41
|
You can easily achieve this by creating a theme file (which is simply Python code) and importing it into your illustration codes (also Python code).
|
|
34
42
|
Here is a typical use case of drawlib.
|
|
35
43
|
|
|
36
|
-

|
|
37
45
|
|
|
38
46
|
We have provided examples of building Sphinx-based documentation with numerous drawlib images. If you're interested, please check out our documentation.
|
|
39
47
|
|
|
40
48
|
## Links
|
|
41
49
|
|
|
42
|
-
- [Documentation](https://www.drawlib.com)
|
|
50
|
+
- [Documentation](https://www.drawlib.com/docs/)
|
|
43
51
|
- [PyPI](https://pypi.org/project/drawlib/)
|
|
44
52
|
- [Code repository](https://github.com/yuichi110/drawlib)
|
|
45
53
|
- [Docs repository](https://github.com/yuichi110/drawlib_docs)
|
|
@@ -100,6 +100,13 @@ from drawlib.v0_1.private.core_canvas.canvas import (
|
|
|
100
100
|
chevron,
|
|
101
101
|
)
|
|
102
102
|
|
|
103
|
+
from drawlib.v0_1.private.icons.util import (
|
|
104
|
+
icon,
|
|
105
|
+
)
|
|
106
|
+
from drawlib.v0_1.private.icons import (
|
|
107
|
+
phosphor as icon_phosphor,
|
|
108
|
+
)
|
|
109
|
+
|
|
103
110
|
#################
|
|
104
111
|
### Utilities ###
|
|
105
112
|
#################
|
|
@@ -113,12 +120,6 @@ from drawlib.v0_1.private import (
|
|
|
113
120
|
from drawlib.v0_1.private.settings import (
|
|
114
121
|
dsettings,
|
|
115
122
|
)
|
|
116
|
-
from drawlib.v0_1.private.icons.util import (
|
|
117
|
-
dicon,
|
|
118
|
-
)
|
|
119
|
-
from drawlib.v0_1.private.icons import (
|
|
120
|
-
phosphor as dicon_phosphor,
|
|
121
|
-
)
|
|
122
123
|
from drawlib.v0_1.private.smartarts import (
|
|
123
124
|
dsart,
|
|
124
125
|
)
|
|
@@ -22,6 +22,8 @@ They provide consistent style setting ways for line/text/shapes.
|
|
|
22
22
|
# Use property for validation
|
|
23
23
|
#
|
|
24
24
|
|
|
25
|
+
from __future__ import annotations
|
|
26
|
+
from copy import deepcopy
|
|
25
27
|
import dataclasses
|
|
26
28
|
from typing import (
|
|
27
29
|
Union,
|
|
@@ -74,6 +76,9 @@ class IconStyle:
|
|
|
74
76
|
halign: Optional[Literal["left", "center", "right"]] = None
|
|
75
77
|
valign: Optional[Literal["bottom", "center", "top"]] = None
|
|
76
78
|
|
|
79
|
+
def copy(self) -> IconStyle:
|
|
80
|
+
return deepcopy(self)
|
|
81
|
+
|
|
77
82
|
@property # type: ignore[no-redef]
|
|
78
83
|
def style(self) -> Optional[str]:
|
|
79
84
|
"""getter of style"""
|
|
@@ -169,6 +174,9 @@ class ImageStyle:
|
|
|
169
174
|
lstyle: Optional[Literal["solid", "dashed", "dotted", "dashdot"]] = None
|
|
170
175
|
lcolor: Union[Tuple[int, int, int], Tuple[int, int, int, float], None] = None
|
|
171
176
|
|
|
177
|
+
def copy(self) -> ImageStyle:
|
|
178
|
+
return deepcopy(self)
|
|
179
|
+
|
|
172
180
|
@property # type: ignore[no-redef]
|
|
173
181
|
def halign(self) -> Optional[str]:
|
|
174
182
|
"""getter of halign"""
|
|
@@ -276,6 +284,9 @@ class LineStyle:
|
|
|
276
284
|
color: Union[Tuple[int, int, int], Tuple[int, int, int, float], None] = None
|
|
277
285
|
alpha: Optional[None] = None
|
|
278
286
|
|
|
287
|
+
def copy(self) -> LineStyle:
|
|
288
|
+
return deepcopy(self)
|
|
289
|
+
|
|
279
290
|
@property # type: ignore[no-redef]
|
|
280
291
|
def width(self) -> Optional[float]:
|
|
281
292
|
"""getter of width"""
|
|
@@ -372,6 +383,9 @@ class LineArrowStyle:
|
|
|
372
383
|
color: Union[Tuple[int, int, int], Tuple[int, int, int, float], None] = None
|
|
373
384
|
alpha: Optional[float] = None
|
|
374
385
|
|
|
386
|
+
def copy(self) -> LineArrowStyle:
|
|
387
|
+
return deepcopy(self)
|
|
388
|
+
|
|
375
389
|
@property # type: ignore[no-redef]
|
|
376
390
|
def lwidth(self) -> Optional[float]:
|
|
377
391
|
"""getter of lwidth"""
|
|
@@ -501,6 +515,9 @@ class ShapeStyle:
|
|
|
501
515
|
lstyle: Optional[Literal["solid", "dashed", "dotted", "dashdot"]] = None
|
|
502
516
|
fcolor: Union[Tuple[int, int, int], Tuple[int, int, int, float], None] = None
|
|
503
517
|
|
|
518
|
+
def copy(self) -> ShapeStyle:
|
|
519
|
+
return deepcopy(self)
|
|
520
|
+
|
|
504
521
|
@property # type: ignore[no-redef]
|
|
505
522
|
def halign(self) -> Optional[str]:
|
|
506
523
|
"""getter of halign"""
|
|
@@ -659,6 +676,9 @@ class ShapeTextStyle:
|
|
|
659
676
|
flip: Optional[bool] = None
|
|
660
677
|
xy_shift: Optional[Tuple[float, float]] = None
|
|
661
678
|
|
|
679
|
+
def copy(self) -> ShapeTextStyle:
|
|
680
|
+
return deepcopy(self)
|
|
681
|
+
|
|
662
682
|
@property # type: ignore[no-redef]
|
|
663
683
|
def halign(self) -> Optional[str]:
|
|
664
684
|
"""getter of halign"""
|
|
@@ -885,6 +905,9 @@ class TextStyle:
|
|
|
885
905
|
bglwidth: Optional[float] = None
|
|
886
906
|
bgfcolor: Union[Tuple[int, int, int], Tuple[int, int, int, float], None] = None
|
|
887
907
|
|
|
908
|
+
def copy(self) -> TextStyle:
|
|
909
|
+
return deepcopy(self)
|
|
910
|
+
|
|
888
911
|
@property # type: ignore[no-redef]
|
|
889
912
|
def halign(self) -> Optional[str]:
|
|
890
913
|
"""getter of halign"""
|