From 5aeb6129ca8c83919576f3e090b7ea2430c6b1b0 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 29 Sep 2017 14:45:09 +0200 Subject: [PATCH] Fix a bug in KIGFX::COLOR4D ctor: . The alpha channel (opacity) was set to 0. this is a mistake. It is now set to 1.0 Fixes lp:1718389 --- common/widgets/color4Dpickerdlg.cpp | 6 +++--- include/gal/color4d.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/widgets/color4Dpickerdlg.cpp b/common/widgets/color4Dpickerdlg.cpp index 39068ef9d6..78328f0686 100644 --- a/common/widgets/color4Dpickerdlg.cpp +++ b/common/widgets/color4Dpickerdlg.cpp @@ -209,7 +209,7 @@ void COLOR4D_PICKER_DLG::createRGBBitmap() double inc = 1.0 / half_size; #define SLOPE_AXIS 50.0 double slope = SLOPE_AXIS/half_size; - color.g = 0; + color.g = 0.0; for( int xx = 0; xx < half_size; xx++ ) // blue axis { @@ -226,7 +226,7 @@ void COLOR4D_PICKER_DLG::createRGBBitmap() } // Red green area in y Z 3d axis - color.b = 0; + color.b = 0.0; for( int xx = 0; xx < half_size; xx++ ) // green axis { color.g = inc * xx; @@ -242,7 +242,7 @@ void COLOR4D_PICKER_DLG::createRGBBitmap() } // Blue green area in x y 3d axis - color.r = 0; + color.r = 0.0; for( int xx = 0; xx < half_size; xx++ ) // green axis { color.g = inc * xx; diff --git a/include/gal/color4d.h b/include/gal/color4d.h index 3803d52f43..0cde7651f4 100644 --- a/include/gal/color4d.h +++ b/include/gal/color4d.h @@ -41,7 +41,7 @@ class COLOR4D public: // Constructor (creates the Color 0,0,0,0) COLOR4D() : - r( 0 ), g( 0 ), b( 0 ), a( 0 ) + r( 0 ), g( 0 ), b( 0 ), a( 1.0 ) { }