Try to fix a compil issue that does not happen on my computers.

This commit is contained in:
jean-pierre charras 2021-09-06 18:34:41 +02:00
parent cf8618a0d5
commit 56374ffa26
2 changed files with 6 additions and 5 deletions

View File

@ -869,7 +869,7 @@ void OPENGL_GAL::DrawArcSegment( const VECTOR2D& aCenterPoint, double aRadius,
// Calculate the seg count to approximate the arc with aMaxError or less
int segCount360 = GetArcToSegmentCount( aRadius, aMaxError, 360.0 );
segCount360 = std::max( CIRCLE_POINTS, segCount360 );
segCount360 = std::max( SEG_PER_CIRCLE_COUNT, segCount360 );
double alphaIncrement = 2.0 * M_PI / segCount360;
// Refinement: Use a segment count multiple of 2, because we have a control point

View File

@ -49,6 +49,9 @@
#define CALLBACK
#endif
///< The default number of points for circle approximation
#define SEG_PER_CIRCLE_COUNT 64
struct bitmap_glyph;
namespace KIGFX
@ -56,6 +59,7 @@ namespace KIGFX
class SHADER;
class GL_BITMAP_CACHE;
/**
* OpenGL implementation of the Graphics Abstraction Layer.
*
@ -299,9 +303,6 @@ private:
/// Super class definition
typedef GAL super;
static const int CIRCLE_POINTS = 64; ///< The number of points for circle approximation
static const int CURVE_POINTS = 32; ///< The number of points for curve approximation
static wxGLContext* m_glMainContext; ///< Parent OpenGL context
wxGLContext* m_glPrivContext; ///< Canvas-specific OpenGL context
static int m_instanceCounter; ///< GL GAL instance counter
@ -510,7 +511,7 @@ private:
double calcAngleStep( double aRadius ) const
{
// Bigger arcs need smaller alpha increment to make them look smooth
return std::min( 1e6 / aRadius, 2.0 * M_PI / CIRCLE_POINTS );
return std::min( 1e6 / aRadius, 2.0 * M_PI / SEG_PER_CIRCLE_COUNT );
}
double getWorldPixelSize() const;