Skip to content

Commit

Permalink
Merge pull request #180 from jhbruhn/patch-1
Browse files Browse the repository at this point in the history
Do not remove anchor when drawing multiline text
  • Loading branch information
g4bri3lDev authored Oct 5, 2024
2 parents d451dc1 + 149839a commit d7b9fba
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions custom_components/open_epaper_link/imagegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ def customimage(entity_id, service, hass):
stroke_fill = element.get('stroke_fill', 'white')
if "max_width" in element:
text = get_wrapped_text(str(element['value']), font, line_length=element['max_width'])
anchor = None
else:
text = str(element['value'])
d.text((element['x'], akt_pos_y), text, fill=getIndexColor(color), font=font, anchor=anchor, align=align, spacing=spacing, stroke_width=stroke_width, stroke_fill=stroke_fill)
Expand Down Expand Up @@ -846,4 +845,4 @@ def rounded_corners(corner_string):
if corner in corner_map:
result[corner_map[corner]] = True

return tuple(result)
return tuple(result)

0 comments on commit d7b9fba

Please sign in to comment.