Flow/wrap text into an irregular shape
dunbarx at aol.com
dunbarx at aol.com
Fri Dec 27 17:22:29 EST 2013
Hi.
This is doable. There are functions, like "the selectedLoc" that will work for you. If you have a field with this in its script:
on keyDown
put the selectedLoc
pass keyDown
end keyDown
You can see the loc of the insertion point within whatever you are typing. You can determine the X value of the triangle as it crosses each line of text, and if less than or greater than those values, you can, perhaps, pad the field text with spaces until you are on the correct side of the graphic. Much more management will be required, especially with long words that might start outside the grc boundary but cross it before that word is finished, but, hey, you asked for it.
Craig
-----Original Message-----
From: Roger Eller <roger.e.eller at sealedair.com>
To: How to use LiveCode <use-livecode at lists.runrev.com>
Sent: Fri, Dec 27, 2013 4:36 pm
Subject: Flow/wrap text into an irregular shape
Imagine a multi-line text field which overlays a triangle polygon, which
is wide at the top, and comes to a point at the bottom. I want the text to
detect the edges of the triangle and wrap at those edges. The result would
be a triangle shaped body of text (centered). My question to you is "How
can this be achieved?"
~Roger
_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list