FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

improve snapping algorithm by leejjoon · Pull Request #726 · matplotlib/matplotlib · GitHub

Repository navigation

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .cpp  (1) .h  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
2 changes: 1 addition & 1 deletion src/_backend_agg.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ RendererAgg::draw_markers(const Py::Tuple& args)
// Deal with the difference in y-axis direction
marker_trans *= agg::trans_affine_scaling(1.0, -1.0);
trans *= agg::trans_affine_scaling(1.0, -1.0);
trans *= agg::trans_affine_translation(0.0, (double)height);
trans *= agg::trans_affine_translation(0.5, (double)height+0.5);

PathIterator marker_path(marker_path_obj);
transformed_path_t marker_path_transformed(marker_path, marker_trans);
Expand Down
4 changes: 2 additions & 2 deletions src/path_converters.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -494,8 +494,8 @@ class PathSnapper
code = m_source->vertex(x, y);
if (m_snap && agg::is_vertex(code))
{
*x = mpl_round(*x) + m_snap_value;
*y = mpl_round(*y) + m_snap_value;
*x = mpl_round(*x-m_snap_value) + m_snap_value;
*y = mpl_round(*y-m_snap_value) + m_snap_value;
}
return code;
}
Expand Down

Back | FazBrowse Home | New Git URL