From 76211243a4bbb376ff78d5e1cf825ff56718431a Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 6 Jun 2012 16:16:30 -0700 Subject: [PATCH] remove now unused blending modes as they have been replaced with AGG compositing modes - refs #1206 --- include/mapnik/graphics.hpp | 90 ------------------------------------- 1 file changed, 90 deletions(-) diff --git a/include/mapnik/graphics.hpp b/include/mapnik/graphics.hpp index 0b5ba8ffa..f655d8d61 100644 --- a/include/mapnik/graphics.hpp +++ b/include/mapnik/graphics.hpp @@ -46,96 +46,6 @@ namespace mapnik { -struct Multiply -{ - inline static void mergeRGB(unsigned const &r0, unsigned const &g0, unsigned const &b0, - unsigned &r1, unsigned &g1, unsigned &b1) - { - r1 = r1*r0/255; - g1 = g1*g0/255; - b1 = b1*b0/255; - } -}; -struct Multiply2 -{ - inline static void mergeRGB(unsigned const &r0, unsigned const &g0, unsigned const &b0, - unsigned &r1, unsigned &g1, unsigned &b1) - { - r1 = r1*r0/128; - if (r1>255) r1=255; - g1 = g1*g0/128; - if (g1>255) g1=255; - b1 = b1*b0/128; - if (b1>255) b1=255; - } -}; -struct Divide -{ - inline static void mergeRGB(unsigned const &r0, unsigned const &g0, unsigned const &b0, - unsigned &r1, unsigned &g1, unsigned &b1) - { - r1 = r0*256/(r1+1); - g1 = g0*256/(g1+1); - b1 = b0*256/(b1+1); - } -}; -struct Divide2 -{ - inline static void mergeRGB(unsigned const &r0, unsigned const &g0, unsigned const &b0, - unsigned &r1, unsigned &g1, unsigned &b1) - { - r1 = r0*128/(r1+1); - g1 = g0*128/(g1+1); - b1 = b0*128/(b1+1); - } -}; -struct Screen -{ - inline static void mergeRGB(unsigned const &r0, unsigned const &g0, unsigned const &b0, - unsigned &r1, unsigned &g1, unsigned &b1) - { - r1 = 255 - (255-r0)*(255-r1)/255; - g1 = 255 - (255-g0)*(255-g1)/255; - b1 = 255 - (255-b0)*(255-b1)/255; - } -}; -struct HardLight -{ - inline static void mergeRGB(unsigned const &r0, unsigned const &g0, unsigned const &b0, - unsigned &r1, unsigned &g1, unsigned &b1) - { - r1 = (r1>128)?255-(255-r0)*(255-2*(r1-128))/256:r0*r1*2/256; - g1 = (g1>128)?255-(255-g0)*(255-2*(g1-128))/256:g0*g1*2/256; - b1 = (b1>128)?255-(255-b0)*(255-2*(b1-128))/256:b0*b1*2/256; - } -}; -struct MergeGrain -{ - inline static void mergeRGB(unsigned const &r0, unsigned const &g0, unsigned const &b0, - unsigned &r1, unsigned &g1, unsigned &b1) - { - r1 = (r1+r0>128)?r1+r0-128:0; - if (r1>255) r1=255; - g1 = (g1+g0>128)?g1+g0-128:0; - if (g1>255) g1=255; - b1 = (b1+b0>128)?b1+b0-128:0; - if (b1>255) b1=255; - } -}; -struct MergeGrain2 -{ - inline static void mergeRGB(unsigned const &r0, unsigned const &g0, unsigned const &b0, - unsigned &r1, unsigned &g1, unsigned &b1) - { - r1 = (2*r1+r0>256)?2*r1+r0-256:0; - if (r1>255) r1=255; - g1 = (2*g1+g0>256)?2*g1+g0-256:0; - if (g1>255) g1=255; - b1 = (2*b1+b0>256)?2*b1+b0-256:0; - if (b1>255) b1=255; - } -}; - class MAPNIK_DECL image_32 { private: