lost pixlib sources

git-svn-id: svn://kolibrios.org@882 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge)
2008-10-20 15:53:55 +00:00
parent a97b422321
commit 673a89c327
11 changed files with 2528 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
brush_t* CreateHatch(int hatch, color_t bkcolor, color_t fcolor)
{
if (hatch < HATCH_MAX)
{
if( br_slab.available )
{
brush_t *brush;
br_slab.available--;
brush = (brush_t*)br_slab.nextavail;
br_slab.nextavail = *(void**)brush;
brush->bkcolor = bkcolor;
brush->fcolor = fcolor;
brush->bmp[0] = hatches[hatch*2];
brush->bmp[1] = hatches[hatch*2+1];
return brush;
}
return NULL;
}
return NULL;
};
brush_t* CreateMonoBrush(color_t bkcolor, color_t fcolor,u32_t bmp0,u32_t bmp1)
{
if( br_slab.available )
{
brush_t *brush;
br_slab.available--;
brush = (brush_t*)br_slab.nextavail;
br_slab.nextavail = *(void**)brush;
brush->bkcolor = bkcolor;
brush->fcolor = fcolor;
brush->bmp[0] = bmp0;
brush->bmp[1] = bmp1;
return brush;
}
return NULL;
};
void DestroyBrush(brush_t *brush)
{
*(void**)brush = br_slab.nextavail;
br_slab.nextavail = brush;
br_slab.available++;
};