From d4caa65cae106f9ccb9f93dc402e374209a8aa7e Mon Sep 17 00:00:00 2001 From: David Capello Date: Wed, 8 Dec 2010 11:35:08 -0300 Subject: [PATCH] Use gfx::Rgb and gfx::Hsv classes for HSV <-> RGB conversions. + Removed rgb_to_hsv_int() and hsv_to_rgb_int() functions. + Changed HSV ranges from [0,255] to H=[0,360], S=[0,100], V=[0,100]. + Simplified Color class (src/app/color.h) using a m_type and m_value union. --- data/widgets/palette_editor.xml | 6 +- src/app/color.cpp | 332 +++++++++++++++------------- src/app/color.h | 52 ++--- src/app/color_unittest.cpp | 6 +- src/app/color_utils.cpp | 124 ++--------- src/commands/cmd_palette_editor.cpp | 100 +++++---- src/raster/blend.cpp | 122 ---------- src/raster/blend.h | 3 - src/raster/palette.cpp | 32 +-- src/raster/quant.cpp | 20 +- src/widgets/color_selector.cpp | 8 +- src/widgets/colview.cpp | 2 +- 12 files changed, 315 insertions(+), 492 deletions(-) diff --git a/data/widgets/palette_editor.xml b/data/widgets/palette_editor.xml index 5d929b6b0..f64044d7c 100644 --- a/data/widgets/palette_editor.xml +++ b/data/widgets/palette_editor.xml @@ -30,15 +30,15 @@