Flow/wrap text into an irregular shape

Roger Eller roger.e.eller at sealedair.com
Fri Dec 27 22:17:27 EST 2013


I actually considered the multiple fields approach, but realizing that the
text may need to scroll if there is more than what will fit, I have that
one marked as having potential, but with some limitations.  I need to keep
the original text fully intact, and this triangle idea is only to be a
"view" for a custom interface made up of various sizes of triangles
throughout.

~Roger

On Fri, Dec 27, 2013 at 10:04 PM, Peter Haworth <pete at lcsql.com> wrote:

> Not sure if this is more complicated or not but perhaps you could have
> several fields vertically in the triangle, each the width of the triangle.
> Then you'd have to figure out how much text would fit in each field
> according to it's formatted width. Hmmm, maybe that is too complicated!
>
> Pete
> lcSQL Software
> On Dec 27, 2013 3:56 PM, "Roger Eller" <roger.e.eller at sealedair.com>
> wrote:
>
> > Thanks Craig. It might be simpler to just use a monospaced font, and know
> > beforehand how many chars will fit each line of text, and wrap
> accordingly.
> >
> > ~Roger
> >
> > On Fri, Dec 27, 2013 at 5:22 PM, <dunbarx at aol.com> wrote:
> >
> > > 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
> > >
> > >
> > > _______________________________________________
> > > 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
> > >
> > _______________________________________________
> > 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
> >
> _______________________________________________
> 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