Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / Drawing / December 2003

Tip: Looking for answers? Try searching our database.

Graphics region

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Crirus - 23 Dec 2003 12:11 GMT
I need a easy way to store in the most compressed format a graphic path
formed from multiple circles
That is, eventualy, a string... I need that string to be converted back to a
graphics path later...

Any thoughts?

Signature

Cheers,
   Crirus

------------------------------
If work were a good thing, the boss would  take it all from you

------------------------------

James Westgate \(Crainiate\) - 23 Dec 2003 12:50 GMT
A graphicsPath is not serializable as far as I know, but can be serialised
to a string quite easily by recording the Points and Path types.
This information is contained in a Drawing2D.PathData object set by the
readonly PathData property. A graphics path can then also be recreated using
byte arrays of points and types which can be recreated from a string/stream
quite easily.

James

Signature

Create interactive flowcharts, diagrams and UML models with ERM3 at
http://www.crainiate.net

> I need a easy way to store in the most compressed format a graphic path
> formed from multiple circles
> That is, eventualy, a string... I need that string to be converted back to a
> graphics path later...
>
> Any thoughts?
Crirus - 23 Dec 2003 12:57 GMT
How about floating point values that cames from a PathPoints array of a
graphics path... can I round it to integers?
I have a circle as GP and I noticed there is some points like
{x=234,Y=451,8421}

Signature

Cheers,
   Crirus

------------------------------
If work were a good thing, the boss would  take it all from you

------------------------------

> A graphicsPath is not serializable as far as I know, but can be serialised
> to a string quite easily by recording the Points and Path types.
[quoted text clipped - 12 lines]
> >
> > Any thoughts?
James Westgate \(Crainiate\) - 23 Dec 2003 17:16 GMT
No, I wouldnt round them - you will see slight distortions if you do eg on
an ellipse, the 4 arcs wont line up quite correctly. Also, if you are
writing XML use the XMLConvert class as you will hit internationalisation
problems with the file being saved with , decimal place instead of .

Signature

Create interactive flowcharts, diagrams and UML models with ERM3 at
http://www.crainiate.net

> How about floating point values that cames from a PathPoints array of a
> graphics path... can I round it to integers?
[quoted text clipped - 20 lines]
> > >
> > > Any thoughts?
Crirus - 27 Dec 2003 11:55 GMT
I'm not worried about that
I just want to converd all that path to a string as short as possible..
anyway, the whole graphicsPath is made by circles... and is quite anoying
with that "xxx,8457"... the string have have at least double length

Signature

Cheers,
   Crirus

------------------------------
If work were a good thing, the boss would  take it all from you

------------------------------

> No, I wouldnt round them - you will see slight distortions if you do eg on
> an ellipse, the 4 arcs wont line up quite correctly. Also, if you are
[quoted text clipped - 28 lines]
> > > >
> > > > Any thoughts?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.