Skip to content

Commit

Permalink
Use fuzzy comparison for stroke join determination.
Browse files Browse the repository at this point in the history
This sometimes produces something just slightly different from 0
compared to x86(_64).
  • Loading branch information
QuLogic committed Jan 11, 2018
1 parent 4dc870a commit 61c1de0
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion extern/agg24-svn/include/agg_math_stroke.h
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,8 @@ namespace agg
vc.remove_all();

double cp = cross_product(v0.x, v0.y, v1.x, v1.y, v2.x, v2.y);
if(cp != 0 && (cp > 0) == (m_width > 0))
if ((cp > agg::vertex_dist_epsilon && m_width > 0) ||
(cp < -agg::vertex_dist_epsilon && m_width < 0))
{
// Inner join
//---------------
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions lib/matplotlib/tests/test_streamplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ def test_startpoints():
plt.plot(start_x, start_y, 'ok')


@image_comparison(baseline_images=['streamplot_colormap'],
tol=0.002)
@image_comparison(baseline_images=['streamplot_colormap'])
def test_colormap():
X, Y, U, V = velocity_field()
plt.streamplot(X, Y, U, V, color=U, density=0.6, linewidth=2,
Expand Down

0 comments on commit 61c1de0

Please sign in to comment.