473,799 Members | 2,741 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Convert a graphicspath to a compressed string

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

------------------------------
Nov 20 '05 #1
16 1847
* "Crirus" <Cr****@datagro up.ro> 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>
Nov 20 '05 #2
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]" <hi************ ***@gmx.at> wrote in message
news:OA******** ******@TK2MSFTN GP10.phx.gbl...
* "Crirus" <Cr****@datagro up.ro> 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>

Nov 20 '05 #3
Hi,

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

Ken
----------------------
"Crirus" <Cr****@datagro up.ro> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
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

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

Nov 20 '05 #4
Cor
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
Nov 20 '05 #5
Cor
Hi Crirus,

And for making such a file as that RESX is the XML dataset I think the most
easiest.
Cor
Nov 20 '05 #6
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]" <vb***@bellsout h.net> wrote in message
news:uS******** ******@TK2MSFTN GP09.phx.gbl...
Hi,

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

Ken
----------------------
"Crirus" <Cr****@datagro up.ro> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
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

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


Nov 20 '05 #7
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]" <vb***@bellsout h.net> wrote in message
news:uS******** ******@TK2MSFTN GP09.phx.gbl...
Hi,

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

Ken
----------------------
"Crirus" <Cr****@datagro up.ro> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
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

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


Nov 20 '05 #8
* "Crirus" <Cr****@datagro up.ro> 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>
Nov 20 '05 #9
:)
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" <no*@non.com> wrote in message
news:et******** ******@TK2MSFTN GP11.phx.gbl...
Hi Crirus,

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

Nov 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
7658
by: Altramagnus | last post by:
I have a complicated Region object, which I need to draw the outline, but not fill How can I convert the Region object to GraphicsPath object? or How can I draw the outline of the Region object?
1
11961
by: jay | last post by:
I have a bitmap and a graphicspath object. I draw pixels on m_Bitmap and I'm drawing text using m_Graphics GraphicsPath object. However, saving my work with m_Bitmap.Save doesn't save GraphicsPath along with it. How do I save it all in a single file? Or how do I "glue" graphicspath to bitmap so they save together? thanks,
4
14123
by: Pavel | last post by:
Hello. I am trying to make a folder compressed and failing miserably. Below are three ways that I tried to make it compressed, all of them compile and run w/o any problems, but the folder is still not-compressed. (using NTFS, win2k) // some folder string path = @"C:\TEMP\";
3
3447
by: Crirus | last post by:
Hello I need to save as a string a graphicPath instance...there is a way of doing this? Crirus
7
2087
by: Crirus | last post by:
Hi Is that true that this IsVisible method is incredible slow? Seems that my app is much slower with only this added as a condition to draw something Crirus
2
5449
by: Martijn Mulder | last post by:
/* GraphicsPath.IsVisible() gives unexpected results. I fill a System.Drawing.Drawing2D.GraphicsPath-object with PointF-structures that define the unit-square (0,0), (1,0), (1,1) and (0,1). Then I test 3 different PointF-structures to see if they fall inside the unit- square and the results are clearly wrong: Point(-0.2, -0.2) falls inside the unit square... WRONG!!! Point(0.2, 0.2) falls inside the unit square... Point(0.7, 0.7) falls...
6
5288
by: Bob Altman | last post by:
Hi all, I'm looking for the fastest way to convert an array of bytes to String. I also need to convert a String back to its original Byte() representation. Convert.ToBase64String and Convert.FromBase64String seem like the closest thing I can find to what I'm looking for baked into the base class library. Can anyone suggest a better way to do this? TIA - Bob
0
9688
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10490
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10259
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10030
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9077
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5467
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5589
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3761
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2941
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.