Skip to content

Commit 38dc689

Browse files
committed
graph: fixed text layout
- need to reëvaluate the context-inheritance situation for textpaths…
1 parent d3ee213 commit 38dc689

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

graph/style.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,10 @@ def node_label(s, node, alpha=1.0):
268268
s.text.a * alpha
269269
)
270270

271+
s._ctx.push()
272+
s._ctx.translate(node.x, node.y)
273+
s._ctx.scale(alpha)
274+
271275
# Cache an outlined label text and translate it.
272276
# This enhances the speed and avoids wiggling text.
273277
try: p = node._textpath
@@ -293,9 +297,6 @@ def node_label(s, node, alpha=1.0):
293297
try: __colors.shadow(dx=2, dy=4, blur=5, alpha=0.3*alpha)
294298
except: pass
295299

296-
s._ctx.push()
297-
s._ctx.translate(node.x, node.y)
298-
s._ctx.scale(alpha)
299300
s._ctx.drawpath(p)
300301
s._ctx.pop()
301302

0 commit comments

Comments
 (0)