473,387 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

how to save a GraphicsPath?

Hello

I need to save as a string a graphicPath instance...there is a way of doing
this?

Crirus
Nov 20 '05 #1
3 3416
Iterate through the Points and the Types arrays of the GraphicsPath, saving
them out to string values.

For i as int32 = 0 to in myPath.PathPoints.Length - 1
'Save each myPath.PathPoints(i)
Next

For i as int32 = 0 to in myPath.PathTypes.Length - 1
'Save each myPath.PathTypes(i)
Next

Then, when you need it, reconstruct your graphics path by calling the
constructor that takes an array of points and types:

myPath = new GraphicsPath(PointArray, TypeArray)
If you need more help than this textual descriptive of what to do, let me
know.

--

Justin Weinberg
Designing a PrintDocument? Drawing to forms?
Check out GDI+ Architect at www.mrgsoft.com

"Crirus" <Cr****@datagroup.ro> wrote in message
news:uK**************@TK2MSFTNGP12.phx.gbl...
Hello

I need to save as a string a graphicPath instance...there is a way of doing this?

Crirus

Nov 20 '05 #2
Ok, thanks, I guess I can handle it...
Do you know if there is a mimimal sat of points that complete my region or
there are more than minimum points needed.... seems that a simple figure
have lots of points there...
"Justin Weinberg" <jweinberg@_spamkill_mrgsoft.com> wrote in message
news:Ow**************@TK2MSFTNGP10.phx.gbl...
Iterate through the Points and the Types arrays of the GraphicsPath, saving them out to string values.

For i as int32 = 0 to in myPath.PathPoints.Length - 1
'Save each myPath.PathPoints(i)
Next

For i as int32 = 0 to in myPath.PathTypes.Length - 1
'Save each myPath.PathTypes(i)
Next

Then, when you need it, reconstruct your graphics path by calling the
constructor that takes an array of points and types:

myPath = new GraphicsPath(PointArray, TypeArray)
If you need more help than this textual descriptive of what to do, let me
know.

--

Justin Weinberg
Designing a PrintDocument? Drawing to forms?
Check out GDI+ Architect at www.mrgsoft.com

"Crirus" <Cr****@datagroup.ro> wrote in message
news:uK**************@TK2MSFTNGP12.phx.gbl...
Hello

I need to save as a string a graphicPath instance...there is a way of

doing
this?

Crirus


Nov 20 '05 #3
You can look at the byte array and figure out what the types are of the
points to get some more information - but each of those points is used to
draw your figure.
--

Justin Weinberg
Designing a PrintDocument? Drawing to forms?
Check out GDI+ Architect at www.mrgsoft.com
"Crirus" <Cr****@datagroup.ro> wrote in message
news:ug**************@tk2msftngp13.phx.gbl...
Ok, thanks, I guess I can handle it...
Do you know if there is a mimimal sat of points that complete my region or
there are more than minimum points needed.... seems that a simple figure
have lots of points there...
"Justin Weinberg" <jweinberg@_spamkill_mrgsoft.com> wrote in message
news:Ow**************@TK2MSFTNGP10.phx.gbl...
Iterate through the Points and the Types arrays of the GraphicsPath,

saving
them out to string values.

For i as int32 = 0 to in myPath.PathPoints.Length - 1
'Save each myPath.PathPoints(i)
Next

For i as int32 = 0 to in myPath.PathTypes.Length - 1
'Save each myPath.PathTypes(i)
Next

Then, when you need it, reconstruct your graphics path by calling the
constructor that takes an array of points and types:

myPath = new GraphicsPath(PointArray, TypeArray)
If you need more help than this textual descriptive of what to do, let me know.

--

Justin Weinberg
Designing a PrintDocument? Drawing to forms?
Check out GDI+ Architect at www.mrgsoft.com

"Crirus" <Cr****@datagroup.ro> wrote in message
news:uK**************@TK2MSFTNGP12.phx.gbl...
Hello

I need to save as a string a graphicPath instance...there is a way of

doing
this?

Crirus



Nov 20 '05 #4

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

Similar topics

11
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?
6
by: Altramagnus | last post by:
I have n number of circles. Some of them might overlap. I need to draw the outline of all circles but not those overlap areas. Initially, I am try to use a Region, because a Region object has a...
7
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
16
by: Crirus | last post by:
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?...
1
by: Hardy Wang | last post by:
Hi, I found a piece of code to add drop shadow to a photo like below, after I save the image, it is actually a BMP file even though I specify a JPG file extension (see...
2
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...

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.