Revision: 4981
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4981&view=rev
Author: mdboom
Date: 2008-02-19 11:41:53 -0800 (Tue, 19 Feb 2008)
Log Message:
-----------
Don't cache many-sided unit regular polygons -- just the small ones --
otherwise we could end up caching many large things.
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/path.py
Modified: trunk/matplotlib/lib/matplotlib/path.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/path.py 2008-02-19 15:56:10 UTC (rev
4980)
+++ trunk/matplotlib/lib/matplotlib/path.py 2008-02-19 19:41:53 UTC (rev
4981)
@@ -317,7 +317,10 @@
Returns a Path for a unit regular polygon with the given
numVertices and radius of 1.0, centered at (0, 0).
"""
- path = cls._unit_regular_polygons.get(numVertices)
+ if numVertices <= 16:
+ path = cls._unit_regular_polygons.get(numVertices)
+ else:
+ path = None
if path is None:
theta = (2*npy.pi/numVertices *
npy.arange(numVertices + 1).reshape((numVertices + 1, 1)))
@@ -337,7 +340,10 @@
Returns a Path for a unit regular star with the given
numVertices and radius of 1.0, centered at (0, 0).
"""
- path = cls._unit_regular_stars.get((numVertices, innerCircle))
+ if numVertices <= 16:
+ path = cls._unit_regular_stars.get((numVertices, innerCircle))
+ else:
+ path = None
if path is None:
ns2 = numVertices * 2
theta = (2*npy.pi/ns2 * npy.arange(ns2 + 1))
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins