|
From: <ai...@us...> - 2009-11-28 01:16:02
|
Revision: 10638
http://plplot.svn.sourceforge.net/plplot/?rev=10638&view=rev
Author: airwin
Date: 2009-11-28 01:15:51 +0000 (Sat, 28 Nov 2009)
Log Message:
-----------
Implement simple test of plfill for the case where the polygon is just
outside the window to demonstrate a current bug (no fill) for this situation.
If you reverse the sign of eps so the polygon is just inside the window,
then the fill occurs properly. If one side of the polygon is just
inside the window (replace xmin = xmin - eps with xmin = xmin +eps), then
the fill occurs in that case as well.
Modified Paths:
--------------
trunk/examples/python/CMakeLists.txt
Added Paths:
-----------
trunk/examples/python/test_fill.py
Modified: trunk/examples/python/CMakeLists.txt
===================================================================
--- trunk/examples/python/CMakeLists.txt 2009-11-28 00:39:41 UTC (rev 10637)
+++ trunk/examples/python/CMakeLists.txt 2009-11-28 01:15:51 UTC (rev 10638)
@@ -82,6 +82,7 @@
testh.py
test_superscript_subscript.py
test_plplot_encodings.py
+ test_fill.py
)
if(ENABLE_tk)
Added: trunk/examples/python/test_fill.py
===================================================================
--- trunk/examples/python/test_fill.py (rev 0)
+++ trunk/examples/python/test_fill.py 2009-11-28 01:15:51 UTC (rev 10638)
@@ -0,0 +1,30 @@
+#!/usr/bin/env python
+# Simple test of plfill for the case where the polygon is just outside the
+# window.
+
+# Append to effective python path so that can find plplot modules.
+from plplot_python_start import *
+
+import sys
+from plplot import *
+from numpy import *
+
+# Parse and process command line arguments
+plparseopts(sys.argv, PL_PARSE_FULL)
+
+# Initialize plplot
+plinit()
+plcol0(2)
+pladv(0)
+plvpor(0.1, 0.9, 0.1, 0.9)
+xmin,xmax,ymin,ymax = (0., 1., 0., 1.)
+plwind(xmin, xmax, ymin, ymax)
+# Just to show edges of viewport
+plbox("bc", 0., 0, "bc", 0., 0)
+plcol0(1)
+eps = 0.001
+xmin,xmax,ymin,ymax = (xmin - eps, xmax + eps, ymin - eps, ymax + eps)
+x = (xmin, xmax, xmax, xmin)
+y = (ymin, ymin, ymax, ymax)
+plfill(x,y)
+plend()
Property changes on: trunk/examples/python/test_fill.py
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|