Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

remove now unused blending modes as they have been replaced with AGG …

…compositing modes - refs #1206
  • Loading branch information...
commit 76211243a4bbb376ff78d5e1cf825ff56718431a 1 parent 291bc9b
Dane Springmeyer springmeyer authored
Showing with 0 additions and 90 deletions.
  1. +0 −90 include/mapnik/graphics.hpp
90 include/mapnik/graphics.hpp
View
@@ -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:
Please sign in to comment.
Something went wrong with that request. Please try again.