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.

Constructing a clip region from points inside the region

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Crirus - 27 Dec 2003 13:45 GMT
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

Signature

Cheers,
   Crirus

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

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

James Westgate \(Crainiate\) - 27 Dec 2003 15:27 GMT
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]
> > >
> > > ------------------------------

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.