Revision: 4929
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4929&view=rev
Author:   mdboom
Date:     2008-02-01 12:15:59 -0800 (Fri, 01 Feb 2008)

Log Message:
-----------
Fix tick-alignment problem (Thanks J?\195?\182rgen Stenarson)

Modified Paths:
--------------
    trunk/matplotlib/lib/matplotlib/lines.py
    trunk/matplotlib/src/_backend_agg.cpp

Modified: trunk/matplotlib/lib/matplotlib/lines.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/lines.py    2008-02-01 19:15:20 UTC (rev 
4928)
+++ trunk/matplotlib/lib/matplotlib/lines.py    2008-02-01 20:15:59 UTC (rev 
4929)
@@ -875,7 +875,7 @@
                               path, path_trans)
 
 
-    _tickhoriz_path = Path([[0.0, 0.5], [1.0, 0.5]])
+    _tickhoriz_path = Path([[0.0, 0.0], [1.0, 0.0]])
     def _draw_tickleft(self, renderer, gc, path, path_trans):
         offset = renderer.points_to_pixels(self._markersize)
         marker_transform = Affine2D().scale(-offset, 1.0)
@@ -890,7 +890,7 @@
                               path, path_trans)
 
 
-    _tickvert_path = Path([[-0.5, 0.0], [-0.5, 1.0]])
+    _tickvert_path = Path([[-0.0, 0.0], [-0.0, 1.0]])
     def _draw_tickup(self, renderer, gc, path, path_trans):
         offset = renderer.points_to_pixels(self._markersize)
         marker_transform = Affine2D().scale(1.0, offset)

Modified: trunk/matplotlib/src/_backend_agg.cpp
===================================================================
--- trunk/matplotlib/src/_backend_agg.cpp       2008-02-01 19:15:20 UTC (rev 
4928)
+++ trunk/matplotlib/src/_backend_agg.cpp       2008-02-01 20:15:59 UTC (rev 
4929)
@@ -465,7 +465,7 @@
 RendererAgg::draw_markers(const Py::Tuple& args) {
   typedef agg::conv_transform<PathIterator>                 transformed_path_t;
   typedef SimplifyPath<transformed_path_t>                  simplify_t;
-  typedef agg::conv_curve<transformed_path_t>               curve_t;
+  typedef agg::conv_curve<simplify_t>                       curve_t;
   typedef agg::conv_stroke<curve_t>                         stroke_t;
   typedef agg::pixfmt_amask_adaptor<pixfmt, alpha_mask_type> pixfmt_amask_type;
   typedef agg::renderer_base<pixfmt_amask_type>                     
amask_ren_type;
@@ -488,15 +488,15 @@
   trans *= agg::trans_affine_translation(0.0, (double)height);
 
   PathIterator marker_path(marker_path_obj);
+  bool marker_snap = should_snap(marker_path, marker_trans);
   transformed_path_t marker_path_transformed(marker_path, marker_trans);
-  curve_t marker_path_curve(marker_path_transformed);
+  simplify_t marker_path_simplified(marker_path_transformed, marker_snap, 
false, width, height);
+  curve_t marker_path_curve(marker_path_simplified);
 
   PathIterator path(path_obj);
-  bool snap = should_snap(path, trans);
   transformed_path_t path_transformed(path, trans);
   GCAgg gc = GCAgg(gc_obj, dpi);
-  simplify_t path_simplified(path_transformed, snap, false, width, height);
-  path_simplified.rewind(0);
+  path_transformed.rewind(0);
 
   facepair_t face = _get_rgba_face(face_obj, gc.alpha);
 
@@ -549,7 +549,7 @@
     agg::serialized_scanlines_adaptor_aa8::embedded_scanline sl;
 
     if (has_clippath) {
-      while (path_simplified.vertex(&x, &y) != agg::path_cmd_stop) {
+      while (path_transformed.vertex(&x, &y) != agg::path_cmd_stop) {
        pixfmt_amask_type pfa(*pixFmt, *alphaMask);
        amask_ren_type r(pfa);
        amask_aa_renderer_type ren(r);
@@ -564,7 +564,7 @@
        agg::render_scanlines(sa, sl, ren);
       }
     } else {
-      while (path_simplified.vertex(&x, &y) != agg::path_cmd_stop) {
+      while (path_transformed.vertex(&x, &y) != agg::path_cmd_stop) {
        if (face.first) {
          rendererAA->color(face.second);
          sa.init(fillCache, fillSize, x, y);


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

Reply via email to