SF.net SVN: matplotlib:[6337] trunk/matplotlib/doc

2008-10-27 Thread jdh2358
Revision: 6337
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6337&view=rev
Author:   jdh2358
Date: 2008-10-27 18:04:58 + (Mon, 27 Oct 2008)

Log Message:
---
fixed navigation table

Modified Paths:
--
trunk/matplotlib/doc/_templates/gallery.html
trunk/matplotlib/doc/api/pyplot_api.rst
trunk/matplotlib/doc/users/navigation_toolbar.rst

Modified: trunk/matplotlib/doc/_templates/gallery.html
===
--- trunk/matplotlib/doc/_templates/gallery.html2008-10-26 14:33:36 UTC 
(rev 6336)
+++ trunk/matplotlib/doc/_templates/gallery.html2008-10-27 18:04:58 UTC 
(rev 6337)
@@ -267,6 +267,8 @@
 
 
 
+
+
 
 
 

Modified: trunk/matplotlib/doc/api/pyplot_api.rst
===
--- trunk/matplotlib/doc/api/pyplot_api.rst 2008-10-26 14:33:36 UTC (rev 
6336)
+++ trunk/matplotlib/doc/api/pyplot_api.rst 2008-10-27 18:04:58 UTC (rev 
6337)
@@ -1,8 +1,8 @@
 *
 matplotlib pyplot
 *
+ 
 
-
 :mod:`matplotlib.pyplot`
 
 

Modified: trunk/matplotlib/doc/users/navigation_toolbar.rst
===
--- trunk/matplotlib/doc/users/navigation_toolbar.rst   2008-10-26 14:33:36 UTC 
(rev 6336)
+++ trunk/matplotlib/doc/users/navigation_toolbar.rst   2008-10-27 18:04:58 UTC 
(rev 6337)
@@ -79,9 +79,9 @@
 Navigation Keyboard Shortcuts
 -
 
-== =
+== 
==
 CommandKeyboard Shortcut(s)
-== =
+== 
==
 Home/Reset **h** or **r** or **home**
 Back   **c** or **left arrow** or **backspace**
 Forward**v** or **right arrow** 
@@ -89,16 +89,12 @@
 Zoom-to-rect   **o**   
 Save   **s**   
 Toggle fullscreen  **f**
--- -
-**Pan/Zoom mode only** 
-- constrain pan/zoom to x axis hold **x**
-- constrain pan/zoom to y axis hold **y**
-- preserve aspect ratiohold **CONTROL** 
--- -
-**In axes only**
-- Toggle grid  **g**
-- Toggle y axis scale (log/linear) **l**
-== =
+Constrain pan/zoom to x axis   hold **x**
+Constrain pan/zoom to y axis   hold **y**
+Preserve aspect ratio  hold **CONTROL** 
+Toggle grid**g**
+Toggle y axis scale (log/linear)   **l**
+== 
==
 
 If you are using :mod:`matplotlib.pyplot` the toolbar will be created
 automatically for every figure.  If you are writing your own user


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 the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib:[6339] trunk/matplotlib/src/_backend_agg.cpp

2008-10-27 Thread mdboom
Revision: 6339
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6339&view=rev
Author:   mdboom
Date: 2008-10-27 19:40:25 + (Mon, 27 Oct 2008)

Log Message:
---
Removed TODO (this has been implemented).

Modified Paths:
--
trunk/matplotlib/src/_backend_agg.cpp

Modified: trunk/matplotlib/src/_backend_agg.cpp
===
--- trunk/matplotlib/src/_backend_agg.cpp   2008-10-27 18:52:41 UTC (rev 
6338)
+++ trunk/matplotlib/src/_backend_agg.cpp   2008-10-27 19:40:25 UTC (rev 
6339)
@@ -775,7 +775,6 @@
 }
 
 
-// MGDTODO: Support clip paths
 Py::Object
 RendererAgg::draw_image(const Py::Tuple& args) {
   _VERBOSE("RendererAgg::draw_image");


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 the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib:[6340] trunk/matplotlib/src

2008-10-27 Thread mdboom
Revision: 6340
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6340&view=rev
Author:   mdboom
Date: 2008-10-27 21:13:24 + (Mon, 27 Oct 2008)

Log Message:
---
Reduce heap allocation of objects.  Be safer when forced to do heap allocation. 
 Remove some dead code.

Modified Paths:
--
trunk/matplotlib/src/_backend_agg.cpp
trunk/matplotlib/src/_backend_agg.h

Modified: trunk/matplotlib/src/_backend_agg.cpp
===
--- trunk/matplotlib/src/_backend_agg.cpp   2008-10-27 19:40:25 UTC (rev 
6339)
+++ trunk/matplotlib/src/_backend_agg.cpp   2008-10-27 21:13:24 UTC (rev 
6340)
@@ -263,63 +263,57 @@
   height(height),
   dpi(dpi),
   NUMBYTES(width*height*4),
+  pixBuffer(NULL),
+  renderingBuffer(),
   alphaBuffer(NULL),
-  alphaMaskRenderingBuffer(NULL),
-  alphaMask(NULL),
-  pixfmtAlphaMask(NULL),
-  rendererBaseAlphaMask(NULL),
-  rendererAlphaMask(NULL),
-  scanlineAlphaMask(NULL),
+  alphaMaskRenderingBuffer(),
+  alphaMask(alphaMaskRenderingBuffer),
+  pixfmtAlphaMask(alphaMaskRenderingBuffer),
+  rendererBaseAlphaMask(),
+  rendererAlphaMask(),
+  scanlineAlphaMask(),
+  slineP8(),
+  slineBin(),
+  pixFmt(),
+  rendererBase(),
+  rendererAA(),
+  rendererBin(),
+  theRasterizer(),
   debug(debug)
 {
   _VERBOSE("RendererAgg::RendererAgg");
   unsigned stride(width*4);
 
   pixBuffer  = new agg::int8u[NUMBYTES];
-  renderingBuffer = new agg::rendering_buffer;
-  renderingBuffer->attach(pixBuffer, width, height, stride);
-
-  slineP8  = new scanline_p8;
-  slineBin = new scanline_bin;
-
-  pixFmt   = new pixfmt(*renderingBuffer);
-  rendererBase = new renderer_base(*pixFmt);
-  rendererBase->clear(agg::rgba(1, 1, 1, 0));
-
-  rendererAA   = new renderer_aa(*rendererBase);
-  rendererBin  = new renderer_bin(*rendererBase);
-  theRasterizer = new rasterizer();
-  //theRasterizer->filling_rule(agg::fill_even_odd);
-  //theRasterizer->filling_rule(agg::fill_non_zero);
-
+  renderingBuffer.attach(pixBuffer, width, height, stride);
+  pixFmt.attach(renderingBuffer);
+  rendererBase.attach(pixFmt);
+  rendererBase.clear(agg::rgba(1, 1, 1, 0));
+  rendererAA.attach(rendererBase);
+  rendererBin.attach(rendererBase);
 }
 
 void RendererAgg::create_alpha_buffers() {
   if (!alphaBuffer) {
 unsigned stride(width*4);
 alphaBuffer   = new agg::int8u[NUMBYTES];
-alphaMaskRenderingBuffer = new agg::rendering_buffer;
-alphaMaskRenderingBuffer->attach(alphaBuffer, width, height, stride);
-alphaMask = new alpha_mask_type(*alphaMaskRenderingBuffer);
-
-pixfmtAlphaMask   = new agg::pixfmt_gray8(*alphaMaskRenderingBuffer);
-rendererBaseAlphaMask  = new 
renderer_base_alpha_mask_type(*pixfmtAlphaMask);
-rendererAlphaMask = new 
renderer_alpha_mask_type(*rendererBaseAlphaMask);
-scanlineAlphaMask = new agg::scanline_p8();
+alphaMaskRenderingBuffer.attach(alphaBuffer, width, height, stride);
+rendererBaseAlphaMask.attach(pixfmtAlphaMask);
+rendererAlphaMask.attach(rendererBaseAlphaMask);
   }
 }
 
 template
 void
-RendererAgg::set_clipbox(const Py::Object& cliprect, R rasterizer) {
+RendererAgg::set_clipbox(const Py::Object& cliprect, R& rasterizer) {
   //set the clip rectangle from the gc
 
   _VERBOSE("RendererAgg::set_clipbox");
 
   double l, b, r, t;
   if (py_convert_bbox(cliprect.ptr(), l, b, r, t)) {
-rasterizer->clip_box(int(mpl_round(l)) + 1, height - int(mpl_round(b)),
-int(mpl_round(r)), height - int(mpl_round(t)));
+rasterizer.clip_box(int(mpl_round(l)) + 1, height - int(mpl_round(b)),
+int(mpl_round(r)), height - int(mpl_round(t)));
   }
 
   _VERBOSE("RendererAgg::set_clipbox done");
@@ -341,45 +335,6 @@
   return face;
 }
 
-SnapData
-SafeSnap::snap (const float& x, const float& y) {
-  xsnap = (int)(x + 0.5f);
-  ysnap = (int)(y + 0.5f);
-
-  if ( first || ( (xsnap!=lastxsnap) || (ysnap!=lastysnap) ) ) {
-lastxsnap = xsnap;
-lastysnap = ysnap;
-lastx = x;
-lasty = y;
-first = false;
-return SnapData(true, xsnap, ysnap);
-  }
-
-  // ok both are equal and we need to do an offset
-  if ( (x==lastx) && (y==lasty) ) {
-// no choice but to return equal coords; set newpoint = false
-lastxsnap = xsnap;
-lastysnap = ysnap;
-lastx = x;
-lasty = y;
-return SnapData(false, xsnap, ysnap);
-  }
-
-  // ok the real points are not identical but the rounded ones, so do
-  // a one pixel offset
-  if (x>lastx) xsnap += 1.;
-  else if (xlasty) ysnap += 1.;
-  else if (y
 bool should_snap(Path& path, const agg::trans_affine& trans) {
   // If this contains only straight horizontal or vertical lines, it should be
@@ -443,12 +398,17 @@
 throw Py::MemoryError("RendererAgg::copy_from_bbox could not allocate 
memory for buffer");
   }
 
-  agg::rendering_buffer rbuf;
-  rbuf.attach(reg->data, reg->width, reg->he