Max line coords canvas.create_line() can display?
Fredrik Lundh
fredrik at pythonware.com
Thu Sep 5 13:27:13 EDT 2002
Jørgen Hansen wrote:
> the small program below fails to draw the line, when it is called with
> an integer larger than or equal to 16384. I only tested the script on
> a Windows 98 machine with Python 2.1.3.
this works just fine under Windows 2K.
a little digging reveals that this is a limitation of the Windows 9X
GDI implementation:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/linecurv_10bp.asp
Windows 95/98/Me: Polyline cannot draw more than a certain
number of points. The limit depends on the line width (that is,
the width of the pen selected into the DC), as shown in the
following table.
Line width -- Maximum points allowed
line width is 1 -- 16K
line width > 1 (that is, wideline) and device supports wideline -- 16K
line width > 1 but device does not support wideline -- approximately
1360 (that is, approximately 16K / 12)
Any extra points are ignored. To draw a line with more points,
divide the data into groups that have less than the maximum
number of points and call the function for each group of points.
Remember to connect the line segments.
(looks like a 64k limit somewhere in the device driver interface)
</F>
More information about the Python-list
mailing list