From 0ba116a3ee5a8580a8ba84723c404b862fec41ab Mon Sep 17 00:00:00 2001 From: Ian McInerney Date: Wed, 22 Feb 2023 00:54:39 +0000 Subject: [PATCH] Remove unused functions from COLOR4D --- common/gal/color4d.cpp | 21 +-------------------- include/gal/color4d.h | 12 ------------ 2 files changed, 1 insertion(+), 32 deletions(-) diff --git a/common/gal/color4d.cpp b/common/gal/color4d.cpp index 2b5c706bda..6aa78e390d 100644 --- a/common/gal/color4d.cpp +++ b/common/gal/color4d.cpp @@ -227,8 +227,6 @@ wxColour COLOR4D::ToColour() const return colour; } -#endif - COLOR4D COLOR4D::LegacyMix( const COLOR4D& aColor ) const { @@ -244,24 +242,7 @@ COLOR4D COLOR4D::LegacyMix( const COLOR4D& aColor ) const return candidate; } - - -unsigned int COLOR4D::ToU32() const -{ - return ToColour().GetRGB(); -} - - -void COLOR4D::FromU32( unsigned int aPackedColor ) -{ - wxColour c; - c.SetRGB( aPackedColor ); - r = c.Red() / 255.0; - g = c.Green() / 255.0; - b = c.Blue() / 255.0; - a = c.Alpha() / 255.0; -} - +#endif namespace KIGFX { diff --git a/include/gal/color4d.h b/include/gal/color4d.h index 266b4e97f1..97dbb4ec4e 100644 --- a/include/gal/color4d.h +++ b/include/gal/color4d.h @@ -182,18 +182,6 @@ public: * @param aColor The color to mix with this one */ COLOR4D LegacyMix( const COLOR4D& aColor ) const; - - /** - * Packs the color into an unsigned int for compatibility with legacy canvas. - * - * @note This is a lossy downsampling and also that the alpha channel is lost. - */ - unsigned int ToU32() const; - - /** - * Unpack from a unsigned int in the legacy EDA_COLOR_T format. - */ - void FromU32( unsigned int aPackedColor ); #endif /* WX_COMPATIBILITY */