PC Review


Reply
Thread Tools Rate Thread

Convert a graphicspath to a compressed string

 
 
Crirus
Guest
Posts: n/a
 
      23rd Dec 2003
I have a graphics path composed from multiple circles that may overlap...
That graphics path I need it converted to a string and that string I whould
like to be as small as possible

Any ideeas?

--
Cheers,
Crirus

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

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


 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      23rd Dec 2003
* "Crirus" <(E-Mail Removed)> scripsit:
> I have a graphics path composed from multiple circles that may overlap...
> That graphics path I need it converted to a string and that string I whould
> like to be as small as possible


String? I don't understand what you want to do. A 'GraphisPath' can
have a custom shape, how would you convert that to a "string"?!

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
 
Reply With Quote
 
Crirus
Guest
Posts: n/a
 
      23rd Dec 2003
That's the ideea... I need to send it over TCP to a client... so I need to
decompose the GraphicsPath to a sort of string thatc an be reconstructed as
GraphicsPath on the other side

--
Cheers,
Crirus

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

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

"Herfried K. Wagner [MVP]" <hirf-spam-me-(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> * "Crirus" <(E-Mail Removed)> scripsit:
> > I have a graphics path composed from multiple circles that may

overlap...
> > That graphics path I need it converted to a string and that string I

whould
> > like to be as small as possible

>
> String? I don't understand what you want to do. A 'GraphisPath' can
> have a custom shape, how would you convert that to a "string"?!
>
> --
> Herfried K. Wagner [MVP]
> <http://www.mvps.org/dotnet>



 
Reply With Quote
 
Ken Tucker [MVP]
Guest
Posts: n/a
 
      23rd Dec 2003
Hi,

The GraphicsPath.PathPoints returns an array of pointf. I guess you
convert that to a string. It wont be small.

Ken
----------------------
"Crirus" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>I have a graphics path composed from multiple circles that may overlap...
> That graphics path I need it converted to a string and that string I
> whould
> like to be as small as possible
>
> Any ideeas?
>
> --
> Cheers,
> Crirus
>
> ------------------------------
> If work were a good thing, the boss would take it all from you
>
> ------------------------------
>
>



 
Reply With Quote
 
Cor
Guest
Posts: n/a
 
      23rd Dec 2003
Hi Crirus,
Have a look to the resx file

as a test.
Create a new project
Drop the imagelist on your form
Add an image to that imagelist
Open your solution explorer
Set the option show all files to true
Open the form1 root with the +
Open the resx file in your designer
Show it in XML view
You have a nice example how to transport your bitmaps.

Cor


 
Reply With Quote
 
Cor
Guest
Posts: n/a
 
      23rd Dec 2003
Hi Crirus,

And for making such a file as that RESX is the XML dataset I think the most
easiest.


Cor


 
Reply With Quote
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      23rd Dec 2003
* "Crirus" <(E-Mail Removed)> scripsit:
> That's the ideea... I need to send it over TCP to a client... so I need to
> decompose the GraphicsPath to a sort of string thatc an be reconstructed as
> GraphicsPath on the other side


Thanks -- now I understand what you want: You want a string
representation of the 'GraphicsPath'. Having a quick look at the
'GraphicsPath' class shows the properties 'PathData', 'PathPoints' and
'PathTypes'. Maybe looping though the collection and converting the
data to a string will be a good way to convert the 'PrapthicsPath' to a
string. You can use a 'StringBuilder' to create the text
representation.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
 
Reply With Quote
 
Crirus
Guest
Posts: n/a
 
      23rd Dec 2003
Yes, I can use that, and pathTypes too, but I'm trying to find a better way,
or at least to compress the string resulted somehow

--
Cheers,
Crirus

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

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

"Ken Tucker [MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> The GraphicsPath.PathPoints returns an array of pointf. I guess

you
> convert that to a string. It wont be small.
>
> Ken
> ----------------------
> "Crirus" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> >I have a graphics path composed from multiple circles that may overlap...
> > That graphics path I need it converted to a string and that string I
> > whould
> > like to be as small as possible
> >
> > Any ideeas?
> >
> > --
> > Cheers,
> > Crirus
> >
> > ------------------------------
> > If work were a good thing, the boss would take it all from you
> >
> > ------------------------------
> >
> >

>
>



 
Reply With Quote
 
Crirus
Guest
Posts: n/a
 
      23rd Dec 2003
I noticed that pathPoints return points as floating.... ex: Y:=425,1854...
how much should I care about the numbes following the comma?

--
Cheers,
Crirus

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

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

"Ken Tucker [MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> The GraphicsPath.PathPoints returns an array of pointf. I guess

you
> convert that to a string. It wont be small.
>
> Ken
> ----------------------
> "Crirus" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> >I have a graphics path composed from multiple circles that may overlap...
> > That graphics path I need it converted to a string and that string I
> > whould
> > like to be as small as possible
> >
> > Any ideeas?
> >
> > --
> > Cheers,
> > Crirus
> >
> > ------------------------------
> > If work were a good thing, the boss would take it all from you
> >
> > ------------------------------
> >
> >

>
>



 
Reply With Quote
 
Crirus
Guest
Posts: n/a
 
      23rd Dec 2003

Cor, thanks, but I'm fighting with a GraphicsPath here not a image...

--
Cheers,
Crirus

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

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

"Cor" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi Crirus,
>
> And for making such a file as that RESX is the XML dataset I think the

most
> easiest.
>
>
> Cor
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to send compressed string through socket ? fniles Microsoft VB .NET 3 7th Apr 2011 10:14 PM
Convert compressed AVI to WMV oldfriend Microsoft Access VBA Modules 0 9th Jul 2008 02:12 PM
HELP: How to convert a Region object to a GraphicsPath object Altramagnus Microsoft Dot NET Framework 11 6th Aug 2004 01:52 PM
HELP: How to convert a Region object to a GraphicsPath object Altramagnus Microsoft Dot NET 11 6th Aug 2004 01:52 PM
Re: How to convert a Region object to a GraphicsPath object Altramagnus Microsoft C# .NET 5 6th Aug 2004 03:23 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:42 PM.