Re: Using the FTC as an editor, then drawing rendered text
- From: Ryan Dary <ftc@xxxxxxxxxxxxx>
- To: ftcdev@xxxxxxxxxxxxx
- Date: Tue, 30 Dec 2008 06:28:16 -0700
I'm designing this with one FTC editor that I reuse for each of the
elements that contain text. So, the user would click on an element on
their drawing and an editor window pops up. If they click on a
rectangle, they can choose the border and background color. If they
choose a "text" element, then I popup an FTC editor window. The user
edits the content and clicks okay. Then I update the text element on
the drawing with the newly styled text. It is that last step of drawing
the text on my custom drawing element that I'm wanting to do.
So, I'm wondering if I can use the "back-end" of FTC in order to perform
the rendering in my custom objects, without the FTC GUI elements.
Does that make sense?
It would be nice if I could use FTDocument to perform the drawing
without needing to use the FormattedText control.
- Ryan
Peter Karlsson wrote:
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.
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:
- » Using the FTC as an editor, then drawing rendered text - Ryan Dary
- » Re: Using the FTC as an editor, then drawing rendered text - Peter Karlsson
- » Re: Using the FTC as an editor, then drawing rendered text - Ryan Dary
- » Re: Using the FTC as an editor, then drawing rendered text - Peter Karlsson
- » Re: Using the FTC as an editor, then drawing rendered text - Brendan Murphy
- » Re: Using the FTC as an editor, then drawing rendered text - Ryan Dary
- » Re: Using the FTC as an editor, then drawing rendered text - Brendan Murphy
- » Re: Using the FTC as an editor, then drawing rendered text - Ryan Dary
- » Re: Using the FTC as an editor, then drawing rendered text - Brendan Murphy
- » Re: Using the FTC as an editor, then drawing rendered text - Ryan Dary
- » Re: Using the FTC as an editor, then drawing rendered text - Ryan Dary
- » Re: Using the FTC as an editor, then drawing rendered text - Brendan Murphy
- » Re: Using the FTC as an editor, then drawing rendered text - Ryan Dary
- » Re: Using the FTC as an editor, then drawing rendered text - Ryan Dary
- » Re: Using the FTC as an editor, then drawing rendered text - Brendan Murphy