mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-10-02 21:12:07 +00:00
Fixed blurred text with background after bfbced3
before commit - https://user-images.githubusercontent.com/9417531/233907917-f86ad10b-0227-4180-9488-a8b71a00f099.png after commit https://user-images.githubusercontent.com/9417531/233907920-d100c73a-e206-42fd-bb41-f7257ea6f98c.png Tested it on firefox too
This commit is contained in:
@@ -710,11 +710,11 @@ class SvgWriter:
|
|||||||
"transform": transform,
|
"transform": transform,
|
||||||
"style": "font-size: 0;",
|
"style": "font-size: 0;",
|
||||||
}
|
}
|
||||||
if "fill-bg" in classes:
|
|
||||||
attribs["filter"] = "url(#fill-background)"
|
def add_text_tag(add_fill_bg):
|
||||||
text_tag = self.svg.text(
|
text_tag = self.svg.text(
|
||||||
"",
|
"",
|
||||||
**attribs,
|
**(attribs | {"filter": "url(#fill-background)"}) if add_fill_bg else attribs,
|
||||||
**self.get_box_alignment_parameters(text_literal.BoxAlignment),
|
**self.get_box_alignment_parameters(text_literal.BoxAlignment),
|
||||||
)
|
)
|
||||||
self.svg.add(text_tag)
|
self.svg.add(text_tag)
|
||||||
@@ -728,6 +728,11 @@ class SvgWriter:
|
|||||||
tspan.update({"dy": f"{line_number}em"})
|
tspan.update({"dy": f"{line_number}em"})
|
||||||
text_tag.add(tspan)
|
text_tag.add(tspan)
|
||||||
|
|
||||||
|
if "fill-bg" in classes:
|
||||||
|
add_text_tag(True)
|
||||||
|
add_text_tag(False)
|
||||||
|
|
||||||
|
|
||||||
def draw_break_annotations(self, obj):
|
def draw_break_annotations(self, obj):
|
||||||
x_offset = self.raw_width / 2
|
x_offset = self.raw_width / 2
|
||||||
y_offset = self.raw_height / 2
|
y_offset = self.raw_height / 2
|
||||||
|
|||||||
Reference in New Issue
Block a user