Anyone ever worked out a nice way or being able to make text follow a path or arc segment in WPF?
I have been messing around with GetPointAtFractionLength() from flattened geometry to get specific points but it isnt workable when needing to just allow a string such as “testing” to be curved around a small segment keeping the letters close to each other. Its fine for making all the letters space around an entire ellipse though.
I have checked the WPF text team blog which appears to have been really quiet.
Anyone got any thoughts or come across anything that could give me some better direction on this?
Sacha Barber wrote:
> No but I would love to know, so if you find an answer I'm all ears.
>
>
>
>
>
> ------------------------------------------------------------------------
> From: brennon...@x-coders.com
> To: wpf-di...@googlegroups.com
> Subject: [WPF Disciples] Text on a path
> Date: Sat, 27 Sep 2008 15:49:32 +0100
>
> Anyone ever worked out a nice way or being able to make text follow a
> path or arc segment in WPF?
>
> I have been messing around with GetPointAtFractionLength() from
> flattened geometry to get specific points but it isnt workable when
> needing to just allow a string such as “testing” to be curved around a
> small segment keeping the letters close to each other. Its fine for
> making all the letters space around an entire ellipse though.
>
> I have checked the WPF text team blog which appears to have been
> really quiet.
>
> Anyone got any thoughts or come across anything that could give me
> some better direction on this?
>
>
> ------------------------------------------------------------------------
> Try Facebook in Windows Live Messenger! Try it Now!
> <http://clk.atdmt.com/UKM/go/111354030/direct/01/>
--
Laurent Bugnion [Microsoft MVP, MCP]
Software engineering, Blog: http://www.galasoft.ch
PhotoAlbum: http://www.galasoft.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Generally it is achieved by creating a flattened path geometry from the text which is simple enough, and then the individual path figures etc are modified to position each path.. which is fine if you can visually tweak the position of each path using a tool such as Design.
The issue for me is that I want this to be editable text, which is also possible using TextEffects… but this is a long drawn out scenario of modifying each character.
I can sit here and work it out, just wondered if anyone had come across and easier way of doing it that’s all.
Cheers
I’m quite sure I’ve seen something like this, but don’t count on me to remember where, I thought it was on Petzold’s blog but after a search I presume I was wrong.
Sorry guys….
Corrado
From: wpf-di...@googlegroups.com [mailto:wpf-di...@googlegroups.com] On Behalf Of Sacha Barber
Sent: sabato 27 settembre 2008 20:59
To: wpf-di...@googlegroups.com
Subject: [WPF Disciples] Re: Text on a path
No but I would love to know, so if you find
an answer I'm all ears.
Thanks Corrado. I will just have to nut this out the old fashion way ;-)
Cheers
I’ll ask around get back to you all.
Karl
Thanks Mike, will take a look at this in the morning and post a conversion should I get it to work.
My current implementation is not that dissimilar although his method includes the char rotational requirement so that should save me a lot of foot work. I am using the drawing context method of DrawString().
Don’t you think for a design orientated UI framework, this sort of functionality should be built in? I certainly do, along with programmable brush styles, the same as available with most “design” packages. They are in Expression Design, so I wonder how much of a nightmare they would be to introduce. Maybe John Gossman has some thoughts on this?
Cheers again Mike.
http://timheuer.com/blog/archive/2008/10/06/silverlight-write-text-on-path-textblock-control.aspx
Maybe it's possible to port this to WPF.
Greetings,
Laurent
Brennon Williams wrote:
>
> Thanks Mike, will take a look at this in the morning and post a
> conversion should I get it to work.
>
> My current implementation is not that dissimilar although his method
> includes the char rotational requirement so that should save me a lot
> of foot work. I am using the drawing context method of DrawString().
>
> Don’t you think for a design orientated UI framework, this sort of
> functionality should be built in? I certainly do, along with
> programmable brush styles, the same as available with most “design”
> packages. They are in Expression Design, so I wonder how much of a
> nightmare they would be to introduce. Maybe John Gossman has some
> thoughts on this?
>
> Cheers again Mike.
>
> *From:* wpf-di...@googlegroups.com
> [mailto:wpf-di...@googlegroups.com] *On Behalf Of *Mike Brown
> *Sent:* 28 September 2008 21:55
> *To:* wpf-di...@googlegroups.com
> *Subject:* [WPF Disciples] Re: Text on a path
>
> Found a text to path using gdi+ ... it should be too hard to convert
> to WPF.
>
> http://www.codeproject.com/KB/GDI-plus/Text_on_Path_with_VBNET.aspx
>
> On Sun, Sep 28, 2008 at 12:21 PM, Karl Shifflett
> <ka...@littlerichie.com <mailto:ka...@littlerichie.com>> wrote:
>
> I'll ask around get back to you all.
>
> Karl
>
> *From:* wpf-di...@googlegroups.com
> <mailto:wpf-di...@googlegroups.com>
> [mailto:wpf-di...@googlegroups.com
> <mailto:wpf-di...@googlegroups.com>] *On Behalf Of *Brennon Williams
> *Sent:* Sunday, September 28, 2008 9:11 AM
>
>
> *To:* wpf-di...@googlegroups.com
> <mailto:wpf-di...@googlegroups.com>
> *Subject:* [WPF Disciples] Re: Text on a path
>
> Thanks Corrado. I will just have to nut this out the old fashion way ;-)
>
> Cheers
>
> *From:* wpf-di...@googlegroups.com
> <mailto:wpf-di...@googlegroups.com>
> [mailto:wpf-di...@googlegroups.com
> <mailto:wpf-di...@googlegroups.com>] *On Behalf Of *Corrado Cavalli
> *Sent:* 28 September 2008 14:51
> *To:* wpf-di...@googlegroups.com
> <mailto:wpf-di...@googlegroups.com>
> *Subject:* [WPF Disciples] Re: Text on a path
>
> I'm quite sure I've seen something like this, but don't count on me to
> remember where, I thought it was on Petzold's blog but after a search
> I presume I was wrong.
>
> Sorry guys….
>
> Corrado
>
> *From:* wpf-di...@googlegroups.com
> <mailto:wpf-di...@googlegroups.com>
> [mailto:wpf-di...@googlegroups.com
> <mailto:wpf-di...@googlegroups.com>] *On Behalf Of *Sacha Barber
> *Sent:* sabato 27 settembre 2008 20:59
> *To:* wpf-di...@googlegroups.com
> <mailto:wpf-di...@googlegroups.com>
> *Subject:* [WPF Disciples] Re: Text on a path
>
> No but I would love to know, so if you find an answer I'm all ears.
>
> ------------------------------------------------------------------------
>
> From: brennon...@x-coders.com <mailto:brennon...@x-coders.com>
> To: wpf-di...@googlegroups.com <mailto:wpf-di...@googlegroups.com>
> Subject: [WPF Disciples] Text on a path
> Date: Sat, 27 Sep 2008 15:49:32 +0100
>
> Anyone ever worked out a nice way or being able to make text follow a
> path or arc segment in WPF?
>
> I have been messing around with GetPointAtFractionLength() from
> flattened geometry to get specific points but it isnt workable when
> needing to just allow a string such as "testing" to be curved around a
> small segment keeping the letters close to each other. Its fine for
> making all the letters space around an entire ellipse though.
>
> I have checked the WPF text team blog which appears to have been
> really quiet.
>
> Anyone got any thoughts or come across anything that could give me
> some better direction on this?
>
> ------------------------------------------------------------------------
>
> Try Facebook in Windows Live Messenger! Try it Now!
Hey Yong I would love to see a sample of your explanations below, sounds really interesting.
A guy named Adam Hill sent me a link to his codeproject article today which I think is great to see