
Signature
Cheers,
Crirus
------------------------------
If work were a good thing, the boss would take it all from you
------------------------------
Sorry, your question is not very clear ... what do you have now , a region,
graphicspath, or an array of points? What would you like to save and
restore?
James
> I have all points that are inside a region
>
> But they are a lots of points there... how to convert them to a region as
> GraphicsPath that can be shrinked to a graphicsPath points and types..I need
> the smallest string that reflect the region
Crirus - 28 Dec 2003 07:59 GMT
Wel, I'm looking for various ways to store and send to a graphical client a
region of points
This is what I have:
I have a server with a map (512x512)... (this server have no graphics)
In the server I have an array of points of the map, that are all points
inside some circles... the circles are adiacents (so the points determine a
contiguous portion of the map - not relevant anyway)
Now, I need a way to store all this points in server, and I'm thinking on a
BitArray. (myBitArray(y*512+x) is the point at coords (x,y))
But, in the client I will draw only this areas of the map so I need a way to
send the points to the client...
Anyway, the client dont need to know about each point inside, only the
graphicsPath that can set a draw or clip region.. and I cant send all points
anyway - waste of trafic.
So, how to convert all that points to a GraphicsPath that later I'll convert
to a string of points and types that can be easyly sent to client and
reconstructed
> Sorry, your question is not very clear ... what do you have now , a region,
> graphicspath, or an array of points? What would you like to save and
[quoted text clipped - 17 lines]
> >
> > ------------------------------
Bob Powell [MVP] - 28 Dec 2003 12:15 GMT
When I started to read your post I thought that you were talking about
converting the data in a Region object back into a GraphicsPath but I don't
think this is the case. I think the way you're asking is how to find only a
specific set of points which coincide with the region on your map. If I'm
wrong, explain a little better and we'll see if we can fix the problem.
I think you could just hit-test the points you have with the GraphicsPath
that represents the region you want to include using the IsVisible method.

Signature
Bob Powell [MVP]
C#, System.Drawing
The November edition of Well Formed is now available.
Learn how to create Shell Extensions in managed code.
http://www.bobpowell.net/currentissue.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm
Read my Blog at http://bobpowelldotnet.blogspot.com
> Wel, I'm looking for various ways to store and send to a graphical client a
> region of points
[quoted text clipped - 39 lines]
> > >
> > > ------------------------------
Crirus - 28 Dec 2003 13:55 GMT
Well, what I have is a set of points that is all insides of some circles...
(notice only circles)
I need all that points to make a hit test on them for other pourposes..
anyway I have them
Now, on UI interface(internet client) I want to draw only the region of the
map that corespond to that points th rest is under "FOG of war"
I dont want to send to client all that points because is not relevant
I want only the points that define the whole region visible
Now, I could have a graphicsPath on server and when I add a circle to the
array of points, just add the circle to the GraphicsPath too, but I'm
searching for a better way...
I'm thinking right now to keep the circles as radius and center in a
collection and make a test on each to drop the ones completly inside the
region so I will have only the ones the dont completly overlapp with the
others

Signature
Cheers,
Crirus
------------------------------
If work were a good thing, the boss would take it all from you
------------------------------
> When I started to read your post I thought that you were talking about
> converting the data in a Region object back into a GraphicsPath but I don't
[quoted text clipped - 55 lines]
> > > >
> > > > ------------------------------
Crirus - 28 Dec 2003 13:59 GMT
As further question how can I test if a circle is completly covered by
others in a set?

Signature
Cheers,
Crirus
------------------------------
If work were a good thing, the boss would take it all from you
------------------------------
> Well, what I have is a set of points that is all insides of some circles...
> (notice only circles)
[quoted text clipped - 82 lines]
> > > > >
> > > > > ------------------------------
Crirus - 28 Dec 2003 08:05 GMT
OFF topic to James Westgate
How do you draw does shadows in ERM on shapes? (I sow a screenshot)
> Sorry, your question is not very clear ... what do you have now , a region,
> graphicspath, or an array of points? What would you like to save and
[quoted text clipped - 17 lines]
> >
> > ------------------------------
James Westgate \(Crainiate\) - 29 Dec 2003 13:28 GMT
A shadow is just the same graphicspath drawn at an offset to the main shape.
Shadows are drawn first and are alpha blended with the background.
James

Signature
Create interactive flowcharts, diagrams and UML models with ERM3 at
http://www.crainiate.net
> OFF topic to James Westgate
> How do you draw does shadows in ERM on shapes? (I sow a screenshot)
[quoted text clipped - 22 lines]
> > >
> > > ------------------------------