|
From: <ai...@us...> - 2009-11-28 00:39:50
|
Revision: 10637
http://plplot.svn.sourceforge.net/plplot/?rev=10637&view=rev
Author: airwin
Date: 2009-11-28 00:39:41 +0000 (Sat, 28 Nov 2009)
Log Message:
-----------
Add simple test for whether you get the same result for UTF-8 and
PLplot #[0x....] encoding for unicode. The new example also tests whether
a given device driver responds correctly to the #<FCI-COMMAND/> escape
sequence to change font characteristics in the middle of a string.
Modified Paths:
--------------
trunk/examples/python/CMakeLists.txt
Added Paths:
-----------
trunk/examples/python/test_plplot_encodings.py
Modified: trunk/examples/python/CMakeLists.txt
===================================================================
--- trunk/examples/python/CMakeLists.txt 2009-11-27 18:55:12 UTC (rev 10636)
+++ trunk/examples/python/CMakeLists.txt 2009-11-28 00:39:41 UTC (rev 10637)
@@ -1,7 +1,7 @@
# examples/python/CMakeLists.txt
### Process this file with cmake to produce Makefile
###
-# Copyright (C) 2006 Alan W. Irwin
+# Copyright (C) 2006, 2007, 2008, 2009 Alan W. Irwin
#
# This file is part of PLplot.
#
@@ -81,6 +81,7 @@
test_symbol_clip.py
testh.py
test_superscript_subscript.py
+ test_plplot_encodings.py
)
if(ENABLE_tk)
Added: trunk/examples/python/test_plplot_encodings.py
===================================================================
--- trunk/examples/python/test_plplot_encodings.py (rev 0)
+++ trunk/examples/python/test_plplot_encodings.py 2009-11-28 00:39:41 UTC (rev 10637)
@@ -0,0 +1,31 @@
+#!/usr/bin/env python
+# -*- coding: utf-8; -*-
+# Test whether utf8 and PLplot #[0x...] unicode encoding give same result.
+# Also test whether #<FCI-COMMAND-STRING/> form works to change font
+# characteristics on the fly.
+# 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)
+plwind(0., 1., 0., 1.)
+# Just to show edges of viewport
+plbox("bc", 0., 0, "bc", 0., 0)
+plcol0(1)
+plschr(0., 2.)
+plptex(0.5, 0.5, 1., 0., 0.5, "#<sans-serif/>#[0x222e] is a path integral sign.")
+# semitransparent green.
+plscol0a(2, 0, 255, 0, 0.5)
+plcol0(2)
+plptex(0.5, 0.5, 1., 0., 0.5, "#<sans-serif/>∮ is a path integral sign.")
+plend()
Property changes on: trunk/examples/python/test_plplot_encodings.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.
|