The new NodeBox forum is live! Everything from support.nodebox.net moved here: sign in with the same email to pick up your old posts. Something not working? Write to forum-support@nodebox.net.
LA
Hi there, first of all: i'm a newbie to NodeBox (and Python) ... here's what i'm trying to do:
Draw a textpath via drawpath
Modify point info from that path and draw it via cornu.path
Canvas size is 1024x1024 for example, fontsize 100, textpath x,y are 200.
How to calculate the corresponding cornu.fit values to match the drawpath result?
Thanks: Lars
FB
FB
Frederik De Bleser
NodeBox team
26 Nov 2012
Hi,
I've looked at it and I couldn't find an easy way to match the original path and cornu path.
You've probably already seen the Cornucopia example . Here's some code that might get you started:
cornu = ximport("cornu")
background(.5, .6, .5)
fontsize(1.0)
pt = textpath("hello", 0,0)
points = [[pt.x,pt.y] for pt in pt.points(200)]
transform(CORNER)
scale(0.4)
translate(35, 800)
nofill()
stroke(1)
strokewidth(2)
cornu.drawpath(points)
Original