Click here to Skip to main content
15,867,756 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am wondering whether it is possible to display an arbitray digital number or an aphabet in an animated way just like handwriting?

e.g. to display a "1", from top to bottom smoothly.

Can this be realized with GDI+ c#?

thanks!
Posted
Updated 13-Jul-12 22:46pm
v2
Comments
Suvabrata Roy 14-Jul-12 4:55am    
Hi, Are you try to do so on web ?
Seraph_summer 14-Jul-12 4:57am    
does not matter on web or not, I want to know the possibility.thanks!

1 solution

It can be done, but not using standard text and font methods.
You would have to create each character as an animation and display that - font based characters are "there" or "not there" - they do not have a concept of stroke order which is what you would need.
 
Share this answer
 
Comments
Seraph_summer 14-Jul-12 5:14am    
thanks, but let's assume a simple example, to write "1", the stroke order is simple just one step. but the question for me is how to display it gradually from top to bottom. I am wondering whether we can use paint and erase concept. but I am not so clear.
OriginalGriff 14-Jul-12 5:31am    
"1" is not a single stroke - it is (in most fonts, and even handwriting) 2 or three: a diagonal up, a straight down, and a horizontal. Think about how you write it: personally, I do the vertical, the diagonal, then the horizontal. It gets more complex with "4"!
Even if you decided to use a single vertical stroke for "1", I would recommend using an animation rather than trying to do it in code, because it will get very complex to code some of the other characters: "8" for example requires intersecting curves to be drawn.

I would suggest that GIF files would probably make your job a lot easier here!
Seraph_summer 14-Jul-12 6:11am    
you are right.thanks!

But, by the way, I want to ask you one technique:

with one given path, is it possible to fill in it in an aminated way with GDI+?
OriginalGriff 14-Jul-12 6:51am    
If you mean to have a moving image behind a path, so that it is only visible through the path, then I've not tried in GDI+ and I suspect it wouldn't be easy. It's pretty simple in WPF I understand - but I am not that skilled in WPF, I can just do the basics.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900