6 #include <lib/base/object.h>
7 #include <lib/base/elock.h>
8 #include <lib/gdi/erect.h>
9 #include <lib/gdi/fb.h>
14 gColor(int color): color(color)
20 operator int() const { return color; }
21 bool operator==(const gColor &o) const { return o.color==color; }
26 unsigned char b, g, r, a;
27 gRGB(int r, int g, int b, int a=0): b(b), g(g), r(r), a(a)
30 gRGB(unsigned long val): b(val&0xFF), g((val>>8)&0xFF), r((val>>16)&0xFF), a((val>>24)&0xFF) // ARGB
33 gRGB(): b(0), g(0), r(0), a(0)
36 void operator=(unsigned long val)
43 bool operator < (const gRGB &c) const
61 bool operator==(const gRGB &c) const
63 return (b == c.b) && (g == c.g) && (r == c.r) && (a == c.a);
71 gColor findColor(const gRGB &rgb) const;
78 gLookup(int size, const gPalette &pal, const gRGB &start, const gRGB &end);
80 ~gLookup() { delete [] lookup; }
81 void build(int size, const gPalette &pal, const gRGB &start, const gRGB &end);
87 int x, y, bpp, bypp, stride;
94 struct gSurfaceSystem: gSurface
96 gSurfaceSystem(eSize size, int bpp);
100 struct gPixmap: public iObject
102 DECLARE_REF(gPixmap);
105 void fill(const gRegion &clip, const gColor &color);
111 void blit(const gPixmap &src, ePoint pos, const gRegion &clip, int flags=0);
113 void mergePalette(const gPixmap &target);
114 void line(const gRegion &clip, ePoint start, ePoint end, gColor color);
124 eSize getSize() const { return eSize(surface->x, surface->y); }
126 gPixmap(gSurface *surface);
127 gPixmap(eSize, int bpp);