From 6b6be0fd07a1bfbabf7c641d7fbfcbce1c3c635e Mon Sep 17 00:00:00 2001 From: Jonathan Whiting Date: Thu, 1 Jan 2015 15:50:46 +0000 Subject: [PATCH] Include rgba function def, and un-ambiguate rgba in use --- src/render/median_cut.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/render/median_cut.h b/src/render/median_cut.h index a8e38bdba..3690d7a93 100644 --- a/src/render/median_cut.h +++ b/src/render/median_cut.h @@ -8,6 +8,8 @@ #define RENDER_MEDIAN_CUT_H_INCLUDED #pragma once +#include "doc/color.h" + #include #include @@ -97,12 +99,12 @@ namespace render { // No colors in the box? This should not be possible. ASSERT(count > 0 && "Box without histogram points, you must fill the histogram before using this function."); if (count == 0) - return rgba(0, 0, 0, 255); + return doc::rgba(0, 0, 0, 255); // Returns the mean. - return rgba((255 * r / (Histogram::RElements-1)) / count, - (255 * g / (Histogram::GElements-1)) / count, - (255 * b / (Histogram::BElements-1)) / count, 255); + return doc::rgba((255 * r / (Histogram::RElements-1)) / count, + (255 * g / (Histogram::GElements-1)) / count, + (255 * b / (Histogram::BElements-1)) / count, 255); } // The boxes will be sort in the priority_queue by volume.