5 #include <lib/base/estring.h>
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; }
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
36 bool operator < (const gRGB &c) const
54 bool operator==(const gRGB &c) const
56 return (b == c.b) && (g == c.g) && (r == c.r) && (a == c.a);
64 gColor findColor(const gRGB &rgb) const;
71 gLookup(int size, const gPalette &pal, const gRGB &start, const gRGB &end);
73 ~gLookup() { delete [] lookup; }
74 void build(int size, const gPalette &pal, const gRGB &start, const gRGB &end);
78 * \brief A softreference to a font.
80 * The font is specified by a name and a size.
81 * \c gFont is part of the \ref gdi.
83 class gFont: public virtual iObject
92 * \brief Constructs a font with the given name and size.
93 * \param family The name of the font, for example "NimbusSansL-Regular Sans L Regular".
94 * \param pointSize the size of the font in PIXELS.
96 gFont(const eString &family, int pointSize):
97 family(family), pointSize(pointSize)
114 int x, y, bpp, bypp, stride;
121 struct gSurfaceSystem: gSurface
123 gSurfaceSystem(eSize size, int bpp);
127 struct gPixmap: public iObject
139 eSize getSize() const { return eSize(surface->x, surface->y); }
141 void fill(const eRect &area, const gColor &color);
147 void blit(const gPixmap &src, ePoint pos, const eRect &clip=eRect(), int flags=0);
149 void mergePalette(const gPixmap &target);
150 void line(ePoint start, ePoint end, gColor color);
152 gPixmap(gSurface *surface);
153 gPixmap(eSize, int bpp);