How to Turn a Word Into a Graphic Object?

J. Landman Gay jacque at hyperactivesw.com
Fri Mar 27 10:32:15 EDT 2015


I see that now. I hadn't read the whole thread when I answered. 

On March 27, 2015 9:27:00 AM CDT, Mark Schonewille <m.schonewille at economy-x-talk.com> wrote:
>Hi,
>
>That's what I did in the solution I posted. I made it a long time ago 
>and now I don't remember why I didn't use the formattedRect. It would 
>probably be easier to use the formattedRect.
>
>--
>Best regards,
>
>Mark Schonewille
>
>Economy-x-Talk Consulting and Software Engineering
>Homepage: http://economy-x-talk.com
>Twitter: http://twitter.com/xtalkprogrammer
>KvK: 50277553
>
>Installer Maker for LiveCode:
>http://qery.us/468
>
>Buy my new book "Programming LiveCode for the Real Beginner" 
>http://qery.us/3fi
>
>LiveCode on Facebook:
>https://www.facebook.com/groups/runrev/
>
>On 3/27/2015 15:16, J. Landman Gay wrote:
>> The selectedLoc will give you the pixel location of the selection.
>Then you can use the formattedwidth and formattedheight to calculate
>the rectangle for the snapshot. When the snapshot is made, the variable
>"it"  will contain the long ID of the new image. So immediately after
>making the snapshot, "set the name of it to myname".
>>
>>
>> On March 27, 2015 1:28:46 AM CDT, Brahmanathaswami <brahma at hindu.org>
>wrote:
>>> I'm looking for a way to quickly turn words into graphic objects
>>> programmatically.
>>>
>>> If you have a field with the words
>>>
>>> "I am that I am"
>>>
>>> you can programmatically select each word and highlight it etc. but
>I
>>> don't think you can get the actual pixel location of the rect that
>the
>>> hilite takes on the screen... which, theoretically should be doable,
>>> since everything must be drawn on screen, everything has x,y coords
>and
>>>
>>> width and height.
>>>
>>> Assuming the rect of a hilited word *could* be extracted, then it
>would
>>>
>>> be easy to take a import a snap shot of it.
>>>
>>> an auxiliary question: when using "import snapshot" ... how can you
>set
>>>
>>> the name of the resulting image that is placed on the top of the
>card.
>>> It defaults to (e.g.) "image id 6578"  but one cannot know that
>ID...
>>> is
>>> there another way to refer to the latest created object?
>>>
>>> Swasti Astu, Be Well!
>>> Brahmanathaswami
>>>
>>>
>>>
>>> _______________________________________________
>>> 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

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list