}
}
+void gPixmap::fill(const gRegion ®ion, const gRGB &color)
+{
+ unsigned int i;
+ for (i=0; i<region.rects.size(); ++i)
+ {
+ const eRect &area = region.rects[i];
+ if ((area.height()<=0) || (area.width()<=0))
+ continue;
+
+ if (surface->bpp == 32)
+ {
+ __u32 col;
+
+ col = color.argb();
+ col^=0xFF000000;
+
+ if (surface->data_phys && gAccel::getInstance())
+ if (!gAccel::getInstance()->fill(surface, area, col))
+ continue;
+
+ for (int y=area.top(); y<area.bottom(); y++)
+ {
+ __u32 *dst=(__u32*)(((__u8*)surface->data)+y*surface->stride+area.left()*surface->bypp);
+ int x=area.width();
+ while (x--)
+ *dst++=col;
+ }
+ } else
+ eWarning("couldn't rgbfill %d bpp", surface->bpp);
+ }
+}
+
void gPixmap::blit(const gPixmap &src, ePoint pos, const gRegion &clip, int flag)
{
for (unsigned int i=0; i<clip.rects.size(); ++i)
eRect area=eRect(pos, src.size());
area&=clip.rects[i];
area&=eRect(ePoint(0, 0), size());
+
if ((area.width()<0) || (area.height()<0))
continue;
// use duff's device here!
while (width--)
{
- if (!*src)
+ if (!(pal[*src]&0x80000000))
{
src++;
dst++;
if (clip.rects.empty())
return;
- __u32 col;
+ __u32 col = 0;
if (surface->bpp == 8)
{
srf8 = (__u8*)surface->data;
do
{
++a;
- if (a == clip.rects.size())
+ if ((unsigned int)a == clip.rects.size())
a = 0;
if (a == lasthit)
{