Browse Source

Clipper: Use std::function for Z fill callback

6.0.7
Roberto Fernandez Bautista 4 years ago
committed by Jon Evans
parent
commit
cad27f9baa
  1. 2
      thirdparty/clipper/clipper.cpp
  2. 5
      thirdparty/clipper/clipper.hpp

2
thirdparty/clipper/clipper.cpp

@ -2763,7 +2763,7 @@ void Clipper::SetZ( IntPoint& pt, TEdge& e1, TEdge& e2 )
else if( pt == e2.Top )
pt.Z = e2.Top.Z;
else
(*m_ZFill)( e1.Bot, e1.Top, e2.Bot, e2.Top, pt );
m_ZFill( e1.Bot, e1.Top, e2.Bot, e2.Top, pt );
}

5
thirdparty/clipper/clipper.hpp

@ -49,6 +49,7 @@
// use_deprecated: Enables temporary support for the obsolete functions
// #define use_deprecated
#include <functional>
#include <vector>
#include <list>
#include <set>
@ -142,8 +143,8 @@ struct DoublePoint
// ------------------------------------------------------------------------------
#ifdef use_xyz
typedef void (* ZFillCallback)( IntPoint& e1bot, IntPoint& e1top, IntPoint& e2bot, IntPoint& e2top,
IntPoint& pt );
typedef std::function<void( IntPoint& e1bot, IntPoint& e1top, IntPoint& e2bot, IntPoint& e2top,
IntPoint& pt )> ZFillCallback;
#endif
enum InitOptions

Loading…
Cancel
Save