Skip to content

Commit

Permalink
Remove the default transparent stroke on text.
Browse files Browse the repository at this point in the history
  • Loading branch information
rblank committed Dec 30, 2024
1 parent 70794a6 commit b801e63
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/demo/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ g.polygon((0, 0), (30, 0), (40, 20), klass='bold')
g.polyline((0, 0), (30, 0), (40, 20), fill='transparent',
transform=svg.translate(x=50, y=10))
img.rect(0, 0, 400, 100, fill='transparent')
img.text(50, 90, "Some text", fill='green')
img.text(50, 90, "Some text", stroke='transparent', fill='green')
paint_heart(img.group(transform=svg.translate(360, 30).rotate(20).scale(0.5)))
render(img)
```
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/python-libs.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ container.
:arg width,height: The size of the rectangle.
:arg rx,ry: The horizontal and vertical corner radii of the rectangle.
```
```{py:method} text(x, y, text, *, stroke='transparent', **kwargs) -> Text
```{py:method} text(x, y, text, **kwargs) -> Text
Add a
[`<text>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/text) to the
container.
Expand Down Expand Up @@ -279,7 +279,7 @@ element.
:arg rx,ry: The horizontal and vertical corner radii of the rectangle.
````

````{py:class} Text(x, y, text, *, stroke='transparent', **kwargs)
````{py:class} Text(x, y, text, **kwargs)
Represents a
[`<text>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/text)
element.
Expand Down
2 changes: 1 addition & 1 deletion tdoc/common/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# SPDX-License-Identifier: MIT

__project__ = 't-doc-common'
__version__ = '0.26'
__version__ = '0.27.dev1'
4 changes: 2 additions & 2 deletions tdoc/common/python/svg.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,9 @@ def __iter__(self):
class Text(Shape):
__slots__ = Shape._slots + ('x', 'y', 'text')

def __init__(self, x, y, text, *, stroke='transparent', **kwargs):
def __init__(self, x, y, text, **kwargs):
self.x, self.y, self.text = x, y, text
super().__init__(stroke=stroke, **kwargs)
super().__init__(**kwargs)

def __iter__(self):
yield f'<text x="{esc(self.x)}" y="{esc(self.y)}"'
Expand Down

0 comments on commit b801e63

Please sign in to comment.