if (do_name() != 'Home') : ?>
endif ?>
Posted by Tom De Smedt on May 18, 2009
include("util/comment.php"); ?>
NodeBox won't calculate the exact position of paths until it draws them. To transform a path in-place in your script, you can use a Transform object (which I haven't documented yet but there is a short example at the bottom of the tutorial on compound paths).
p = textpath("Hi", 50, 50) # transform it now, not when we draw: tf = Transform() tf.rotate(25) tf.scale(1.5) p = tf.transformBezierPath(p) drawpath(p)When you transform your paths with the Transform object you can then check them for intersections.
Rotating path and checking intersections
Posted by cm on May 05, 2009hi,
then I tried to use path.rotate(), wich has no effect at all. (text doesn't get rotated) I suppose that rotate just effects the actual drawing. Is there an easy way to fix that?I'm trying to check text for collisions, which works quite well with path.intersects(path), but it does not work with rotated paths.
first I tried to use rotate() and then check for collision, which does not work, be cause the check is still done with unrotated path:
Greetings,
cm