473,466 Members | 1,402 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

gdi+ Flatten

When i try using Flatten on my ellipse, i get 6 points no matter how fine i
set the flatness parameter. According to my understanding of the
documentation, the smaller i make flatness the closer the approximation
should be, ie many more points in the approximation.

What am i doing wrong?

TIA!!!

here's the doc:
flatness Specifies the maximum permitted error between the curve and its
flattened approximation. A value of 0.25 is the default. Reducing the
flatness value will increase the number of line segments in the
approximation.
heres the picture with an ellipse NOT well approximated:


http://msdn.microsoft.com/library/en...flattening_pat
hs_about.asp?frame=true


Nov 15 '05 #1
2 1740
Never mind, i was not holding onto the correct GraphicsPath.

(DOH!!!)

Thanks!!
"WoodBeeProgrammer" <Wo***************@spamex.com> wrote in message
news:10***************@utility.isomedia.com...
When i try using Flatten on my ellipse, i get 6 points no matter how fine i set the flatness parameter. According to my understanding of the
documentation, the smaller i make flatness the closer the approximation
should be, ie many more points in the approximation.

What am i doing wrong?

TIA!!!

here's the doc:
flatness Specifies the maximum permitted error between the curve and its
flattened approximation. A value of 0.25 is the default. Reducing the
flatness value will increase the number of line segments in the
approximation.
heres the picture with an ellipse NOT well approximated:

http://msdn.microsoft.com/library/en...flattening_pat hs_about.asp?frame=true

Nov 15 '05 #2
Glad you found the answer ;-)

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

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

Read my Blog at http://bobpowelldotnet.blogspot.com

"WoodBeeProgrammer" <Wo***************@spamex.com> wrote in message
news:10***************@utility.isomedia.com...
Never mind, i was not holding onto the correct GraphicsPath.

(DOH!!!)

Thanks!!
"WoodBeeProgrammer" <Wo***************@spamex.com> wrote in message
news:10***************@utility.isomedia.com...
When i try using Flatten on my ellipse, i get 6 points no matter how fine
i
set the flatness parameter. According to my understanding of the
documentation, the smaller i make flatness the closer the approximation
should be, ie many more points in the approximation.

What am i doing wrong?

TIA!!!

>here's the doc:


flatness Specifies the maximum permitted error between the curve and its
flattened approximation. A value of 0.25 is the default. Reducing the
flatness value will increase the number of line segments in the
approximation.
>heres the picture with an ellipse NOT well approximated:


http://msdn.microsoft.com/library/en...flattening_pat hs_about.asp?frame=true


Nov 15 '05 #3

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

Similar topics

23
by: Francis Avila | last post by:
Below is an implementation a 'flattening' recursive generator (take a nested iterator and remove all its nesting). Is this possibly general and useful enough to be included in itertools? (I know...
0
by: Francis Avila | last post by:
A few days ago (see the 'itertools.flatten()?' thread from October 28) I became obsessed with refactoring a recursive generator that yielded the leaves of nested iterables. When the dust settled,...
10
by: bearophile | last post by:
This is my first Python program (it's an improvement of a recursive version by Luther Blissett). Given a list like this: , ]]] It produces the "flatted" version: I think this operation is...
3
by: Bengt Richter | last post by:
What am I missing? (this is from 2.4b1, so probably it has been fixed?) def flatten(list): l = for elt in list: ^^^^--must be expecting list instance or other sequence t = type(elt) if t...
18
by: Ville Vainio | last post by:
For quick-and-dirty stuff, it's often convenient to flatten a sequence (which perl does, surprise surprise, by default): ]]] -> One such implementation is at ...
181
by: Tom Anderson | last post by:
Comrades, During our current discussion of the fate of functional constructs in python, someone brought up Guido's bull on the matter: http://www.artima.com/weblogs/viewpost.jsp?thread=98196 ...
32
by: Robin Becker | last post by:
Is there some smart/fast way to flatten a level one list using the latest iterator/generator idioms. The problem arises in coneverting lists of (x,y) coordinates into a single list of...
25
by: beginner | last post by:
Hi, I am wondering how do I 'flatten' a list or a tuple? For example, I'd like to transform or ] to . Another question is how do I pass a tuple or list of all the aurgements of a function to...
1
by: farooq.omar | last post by:
Is there a way to specify to Flatten() method as to how many points it should return. example I just want the Flatten() method to give back 100 points (basicallt gp.PointCount==100). Thanks
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,...
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...
1
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...
0
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...
0
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,...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.