Hi, How can you embed a carriage return so you can have multiple lines?
Regards, Wayne Wayne Stewart about.me/waynestewart On 9 November 2015 at 04:38, JPR <[email protected]> wrote: > [JPR] > > Hi All, > > The first version of JPR Text2Pict method has been made in 2000. It's purpose > was to convert a Text into a Picture, with the possibility to select Font, > Style, Size, Color, etc. It was using a Blob inside which the Picture was > build as a PICT by using QuickDraw commands, and then converting the Blob > into a Picture. > Today, QuickDraw is dying *Sigh* along with the PICT format. Although the > possibilities of Multistyle Text, added to the colossal enhancement of List > Boxes, reduce the need for this method, there are still a lot of cases where > it's easier to deal with a Picture than a Text. > > This example uses SVG commands in order to build the Picture from the Text > with the possibility to select the Font, Size, Style(s), Text Color, > Background Color, Rotation, Alignment, Opacity, etc. > > It also illustrates the use of JSON-type 4D Objects to pass parameters to a > Function in a lazy way, in order to simplify the code. > > You will find this example, named JPR_Text2Pict.4dbase, at the same place > than Emoji database, here: > > ftp://JPR:[email protected]/ > > How to use it? Extremely simple! Just run the Test_Text2Pict Form, play with > it, and read the code! > > - In the JPR_Text2Pict Method, during the Init phase, set up the Default > Values of your choice, the method is fully documented in comments. > > - If you want to keep these default values in a Process Variable, just call > the Method once: > > C_OBJECT(myObject) > OB SET(myObject;"xText_Text";vText) > vPict:=JPR_Text2Pict (->myObject;"INIT") > > - Before calling the method, modify whatever Properties you want to. For > instance, changing the Text, the Font, and the Size, then getting the > Picture: > > OB SET(myObject;"xText_Text";"My text to use") > OB SET(myObject;"xText_font_family";"Palatino") > OB SET(myObject;"xText_font_size";18) //or "18", it doesn't matter > vPict:=JPR_Text2Pict (->myObject) > > And the job is done! > > Here also, like for Emoji, it's a gift, so enjoy it, and feel free to use it > as much as you want. A Technote will come soon to explain everything in > detail. > > My very best, > > JPR > > PS: Many thanks to Vincent de Lachaux for the SVGTool_SHOW_IN_VIEWER, and to > Roland Lannuzel for it's Great Rotating Ruler! > ********************************************************************** > 4D Internet Users Group (4D iNUG) > FAQ: http://lists.4d.com/faqnug.html > Archive: http://lists.4d.com/archives.html > Options: http://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:[email protected] > ********************************************************************** ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

