remove dead code

This commit is contained in:
Dane Springmeyer 2013-07-23 16:10:00 -04:00
parent 31931b89cb
commit c5b7cd0e3e
2 changed files with 0 additions and 77 deletions

View file

@ -137,59 +137,6 @@ public:
data_(x,y)=rgba; data_(x,y)=rgba;
} }
} }
inline void blendPixel(int x,int y,unsigned int rgba1,int t)
{
blendPixel2(x,y,rgba1,t,1.0); // do not change opacity
}
inline void blendPixel2(int x,int y,unsigned int rgba1,int t,double opacity)
{
if (checkBounds(x,y))
{
unsigned rgba0 = data_(x,y);
#ifdef MAPNIK_BIG_ENDIAN
unsigned a1 = (unsigned)((rgba1 & 0xff) * opacity) & 0xff; // adjust for desired opacity
a1 = (t*a1) / 255;
if (a1 == 0) return;
unsigned r1 = (rgba1 >> 24) & 0xff;
unsigned g1 = (rgba1 >> 16 ) & 0xff;
unsigned b1 = (rgba1 >> 8) & 0xff;
unsigned a0 = (rgba0 & 0xff);
unsigned r0 = ((rgba0 >> 24 ) & 0xff) * a0;
unsigned g0 = ((rgba0 >> 16 ) & 0xff) * a0;
unsigned b0 = ((rgba0 >> 8) & 0xff) * a0;
a0 = ((a1 + a0) << 8) - a0*a1;
r0 = ((((r1 << 8) - r0) * a1 + (r0 << 8)) / a0);
g0 = ((((g1 << 8) - g0) * a1 + (g0 << 8)) / a0);
b0 = ((((b1 << 8) - b0) * a1 + (b0 << 8)) / a0);
a0 = a0 >> 8;
data_(x,y)= (a0)| (b0 << 8) | (g0 << 16) | (r0 << 24) ;
#else
unsigned a1 = (unsigned)(((rgba1 >> 24) & 0xff) * opacity) & 0xff; // adjust for desired opacity
a1 = (t*a1) / 255;
if (a1 == 0) return;
unsigned r1 = rgba1 & 0xff;
unsigned g1 = (rgba1 >> 8 ) & 0xff;
unsigned b1 = (rgba1 >> 16) & 0xff;
unsigned a0 = (rgba0 >> 24) & 0xff;
unsigned r0 = (rgba0 & 0xff) * a0;
unsigned g0 = ((rgba0 >> 8 ) & 0xff) * a0;
unsigned b0 = ((rgba0 >> 16) & 0xff) * a0;
a0 = ((a1 + a0) << 8) - a0*a1;
r0 = ((((r1 << 8) - r0) * a1 + (r0 << 8)) / a0);
g0 = ((((g1 << 8) - g0) * a1 + (g0 << 8)) / a0);
b0 = ((((b1 << 8) - b0) * a1 + (b0 << 8)) / a0);
a0 = a0 >> 8;
data_(x,y)= (a0 << 24)| (b0 << 16) | (g0 << 8) | (r0) ;
#endif
}
}
void composite_pixel(unsigned op, int x,int y,unsigned c, unsigned cover, double opacity); void composite_pixel(unsigned op, int x,int y,unsigned c, unsigned cover, double opacity);

View file

@ -198,30 +198,6 @@ public:
return height_; return height_;
} }
inline void blendPixel(value_type feature_id,int x,int y,unsigned int rgba1,int t)
{
blendPixel2(feature_id ,x,y,rgba1,t,1.0); // do not change opacity
}
inline void blendPixel2(value_type feature_id,int x,int y,unsigned int rgba1,int t,double opacity)
{
if (checkBounds(x,y))
{
#ifdef MAPNIK_BIG_ENDIAN
unsigned a = (int)((rgba1 & 0xff) * opacity) & 0xff; // adjust for desired opacity
#else
unsigned a = (int)(((rgba1 >> 24) & 0xff) * opacity) & 0xff; // adjust for desired opacity
#endif
// if the pixel is more than a tenth
// opaque then burn in the feature id
if (a >= 25)
{
data_(x,y) = feature_id;
}
}
}
inline void set_rectangle(value_type id,image_data_32 const& data,int x0,int y0) inline void set_rectangle(value_type id,image_data_32 const& data,int x0,int y0)
{ {
box2d<int> ext0(0,0,width_,height_); box2d<int> ext0(0,0,width_,height_);