Exemplo n.º 1
0
static void blend_rgb_hline(Image *image, int x1, int y, int x2, int rgb, int a)
{
  uint32_t* address = ((uint32_t**)image->line)[y]+x1;
  int x;

  for (x=x1; x<=x2; x++) {
    *address = rgba_blend_normal (*address, rgb, a);
    address++;
  }
}
Exemplo n.º 2
0
 inline void operator()(RgbTraits::pixel_t& scanline,
                        const RgbTraits::pixel_t& dst,
                        const IndexedTraits::pixel_t& src,
                        int opacity)
 {
   if (m_blend_mode == BLEND_MODE_COPY) {
     scanline = m_pal->getEntry(src);
   }
   else {
     if (src != m_mask_color) {
       scanline = rgba_blend_normal(dst, m_pal->getEntry(src), opacity);
     }
     else
       scanline = dst;
   }
 }