Re: How to Turn a Word Into a Graphic Object?

2015-04-20 Thread Bob Sneidar
Well for one it seems your spacebar is not working… Bob S On Mar 27, 2015, at 22:00 , Brahmanathaswami bra...@hindu.orgmailto:bra...@hindu.org wrote: put10,10intotPoint subtract5fromitem2oftPoint -- subtracts 5 from the second item Am I doing something wrong?... can anyone confirm?

Re: How to Turn a Word Into a Graphic Object?

2015-03-28 Thread Brahmanathaswami
First: any member of the LIveCode community is always welcome... btw long time user Debdoot is living here for a while now Richard will remember him. Contact me in advance for an insider's tour of our media studio @ Peter substracted ha! right now it works @ Richard: I actually prefer this

Re: How to Turn a Word Into a Graphic Object?

2015-03-28 Thread Richard Gaskin
Brahmanathaswami wrote: Also: I don't see how this (in the docs on snapshot) can apply for snapshots of words in a field as these are not objects perse: You can take a snapshot of an object regardless of its visibility or open status - in particular, snapshots can be taken of objects that

Re: How to Turn a Word Into a Graphic Object?

2015-03-28 Thread Peter M. Brigham
On Mar 28, 2015, at 1:00 AM, Brahmanathaswami wrote: --substract 4 from item 1 of tNextWordSnapshot # won't even compile! Maybe you're a little distracted (or substracted)…. Try subtract 4 from… -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig

RE: How to Turn a Word Into a Graphic Object?

2015-03-28 Thread John Dixon
I noticed that there is a lock screen command but no unlock screen in Jim's handler. Was that done deliberately? -= Mike The screen becomes unlocked after the handler is run... ___ use-livecode

Re: How to Turn a Word Into a Graphic Object?

2015-03-28 Thread Michael Doub
I noticed that there is a lock screen command but no unlock screen in Jim's handler. Was that done deliberately? -= Mike On 3/28/15 10:38 AM, Richard Gaskin wrote: Brahmanathaswami wrote: Also: I don't see how this (in the docs on snapshot) can apply for snapshots of words in a field as

How to Turn a Word Into a Graphic Object?

2015-03-27 Thread Brahmanathaswami
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

Re: How to Turn a Word Into a Graphic Object?

2015-03-27 Thread Mark Schonewille
Hi Brahmanathaswami, Here's an example. // button script on mouseUp put the selectedRect of fld 1 into myRect if myRect is not error then import snapshot from rect myRect of this cd put the long id of it into myImage // do something with myImage here

Re: How to Turn a Word Into a Graphic Object?

2015-03-27 Thread Scott Rossi
See the formattedRect property and measureText function in the docs. Both should help you get what you want. ³Last² refers to the object type that is highest in the hierarchy: set the name of the last image to ³myImage Also, the number of an object type will return the number of the highest

Re: How to Turn a Word Into a Graphic Object?

2015-03-27 Thread Richmond
I would, perhaps predictably, do this in a much more pedestrian and clunky fashion. So: I set up a textField with no borders, and, probably a transparent background. then just have a button with this sort of script: on mouseUp import snapshot from fld myText end mouseUp Richmond.

Re: How to Turn a Word Into a Graphic Object?

2015-03-27 Thread J. Landman Gay
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

Re: How to Turn a Word Into a Graphic Object?

2015-03-27 Thread Mark Schonewille
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:

Re: How to Turn a Word Into a Graphic Object?

2015-03-27 Thread J. Landman Gay
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.schonewi...@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

Re: How to Turn a Word Into a Graphic Object?

2015-03-27 Thread Jim Lambert
Brahma wrote: I'm looking for a way to quickly turn words into graphic objects programmatically. Text is already a kind of vector graphic. So, this will turn words into images not graphic objects. an auxiliary question: when using import snapshot ... how can you set the name of the

Re: How to Turn a Word Into a Graphic Object?

2015-03-27 Thread Brahmanathaswami
Thanks Scott: With formattedRect this turned out to be ridiculously simple: on MouseUp repeat with x = 1 to the number of words of fld _Quote put the formattedRect of word x of fld _Quote into tNextWordSnapshot # add space left and right --substract 4 from item 1 of