Re: Using the FTC as an editor, then drawing rendered text

Why use XML, can't you grab formattedtext.display instead, as in:

  Dim pic as Picture

  // you have to make display public first

  pic = NewPicture(g.Width, g.Height, 32)

  pic.Graphics.DrawPicture(me.display, 0, 0)

You'll get at picture you scale as you like in your other canvas.


Peter Karlsson



30 dec 2008 kl. 11.25 skrev Ryan Dary:

Hello. Perhaps this question has been asked before, please excuse the repetition.

I'm using FTC as an editor for a drawing program. In the window, I'm using a single canvas to render the drawn elements. Currently I draw shapes and text, but the text is only in a single font. I want to use the FTC editor in a separate window when the user double- clicks on the text object in the drawing. Then, let them edit the text, and then I'll render it again in the drawing.

It looks like the XML-based format is best for moving between instances of FTC in order to retain the most information about formatting and custom objects.

Then, how do I use the FTC engine to only render the formatted text in my custom canvas-based implementation. I just need to use the necessary facilities to accept the XML that was gathered from the FTC editor, and somehow "render" it in my own graphics context.

Perhaps a better way to phrase the question is, how do I go from XML from the FTC and then "render" the formatted text offscreen so that I can draw it to my custom canvas-based drawing environment?

Please advise.

Thank you,

Ryan
FTC Website: 
http://www.truenorthsoftware.com/FormattedTextControl/FormattedTextControl.html
Set List Options (digest and vacation modes): www.freelists.org/list/ftcdev
List Archive: www.freelists.org/archives/ftcdev
Unsubscribe: Send email to ftcdev-request@xxxxxxxxxxxxx with "unsubscribe" in the subject field.





FTC Website: 
http://www.truenorthsoftware.com/FormattedTextControl/FormattedTextControl.html
Set List Options (digest and vacation modes): www.freelists.org/list/ftcdev
List Archive: www.freelists.org/archives/ftcdev
Unsubscribe: Send email to ftcdev-request@xxxxxxxxxxxxx with "unsubscribe" in 
the subject field.



Other related posts: