473,396 Members | 1,826 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,396 software developers and data experts.

drawing a path efficiently

When i draw a path with many points the editing becomes slow. I ran
devPartner and it said that the GDI+ method "GetPathPoints" was taking
up alot of processing time. Also GetPathOutline is slow. Has anybody got
advice on the most efficient way to draw paths in C#.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #1
2 2307
Your intentions are not very clear.

I guess that you're editing a user-drawn shape of some kind? Storing the
shape as a GraphicsPath probably isn't very efficient.

You can draw a path using Graphics.DrawPath and fill it using
Graphics.FillPath.

Perhaps you should explain a bit more.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

<James dean> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
When i draw a path with many points the editing becomes slow. I ran
devPartner and it said that the GDI+ method "GetPathPoints" was taking
up alot of processing time. Also GetPathOutline is slow. Has anybody got
advice on the most efficient way to draw paths in C#.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #2
Yeah well i have a specific problem with drawing a polyline. When there
are many points in the polyline then any editing is slow. When any
editing is done then all path points are redrawn...this is inefficient.
Whats the best way to draw a polyline with many points.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #3

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

Similar topics

20
by: Greg | last post by:
I'm fairly new to access (using 2002) and am setting up a DB for work. along with each record the user also needs to make a flow diagram (previously, these reports were composed in word and they...
1
by: Yaron | last post by:
Hi I am drawing two points (which could have any coordinates), and a path between them. The problem is, I want to know when a user clicks on this path between them. I am confused as to how I would...
3
by: anastasia | last post by:
I get an out of memory exception when attempting to excecute the following code: original = System.Drawing.Image.FromFile(file.FileName,true); I ONLY get this exception when the file is in the...
2
by: active | last post by:
I find Bitmap.Save works for WMF files but Bitmap.FromFile does not. If I use FromFile on a WMF file that came with VS I get an exception. If I use it on a WMF file created with Bitmap.Save I...
5
by: benoit | last post by:
Hi, I have this question. When I use the FileUpload WebControl to post an Image (= SourceFile) that I want to resize and write to the server, I keep getting this situation. If that SourceFile...
2
by: Dylan Parry | last post by:
Hi, I'm looking for examples of the different brush and fill styles that can be made using System.Drawing.Drawing2D. I haven't actually used this class before, so any example code accompanying...
0
by: jijiz | last post by:
Hi everyone, My english is quite poor... I prefer inform you about it... So i would like to draw some pictures (cubic, square, lines) into objects (QLabel), and instanciate those objects into a...
1
by: crusson | last post by:
(edited to add): this is in Visual Basic .net I am at a complete loss... I've been building a program on my machine, running it out of the developer with the f5 key and builidng it and running...
2
by: Nathan Sokalski | last post by:
I am attempting to create icons for controls I have created using VB.NET by using the System.Drawing.ToolboxBitmap attribute. I have managed to do this in C# by specifying the path to the *.ico...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.