From b70adc5f99c9992a694ae74782722c63765ca5f2 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 25 Apr 2013 10:00:25 +0200 Subject: [PATCH] Fixed color issue for stroked fonts with OpenGL backend and caching turned on. --- common/gal/opengl/opengl_gal.cpp | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 77bab85e86..9e8bf09f62 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -1183,44 +1183,32 @@ void OPENGL_GAL::DrawCurve( const VECTOR2D& aStartPoint, const VECTOR2D& aContro void OPENGL_GAL::SetStrokeColor( COLOR4D aColor ) { - if( strokeColor != aColor ) - { - isSetAttributes = true; - strokeColor = aColor; + isSetAttributes = true; + strokeColor = aColor; - // This is the default drawing color - glColor4d( aColor.r, aColor.g, aColor.b, aColor.a ); - } + // This is the default drawing color + glColor4d( aColor.r, aColor.g, aColor.b, aColor.a ); } void OPENGL_GAL::SetFillColor( COLOR4D aColor ) { - if( fillColor != aColor ) - { - isSetAttributes = true; - fillColor = aColor; - } + isSetAttributes = true; + fillColor = aColor; } void OPENGL_GAL::SetBackgroundColor( COLOR4D aColor ) { - if( backgroundColor != aColor ) - { - isSetAttributes = true; - backgroundColor = aColor; - } + isSetAttributes = true; + backgroundColor = aColor; } void OPENGL_GAL::SetLineWidth( double aLineWidth ) { - if( lineWidth != aLineWidth ) - { - isSetAttributes = true; - lineWidth = aLineWidth; - } + isSetAttributes = true; + lineWidth = aLineWidth; }