summaryrefslogtreecommitdiffstats
path: root/base/gfx
diff options
context:
space:
mode:
Diffstat (limited to 'base/gfx')
-rwxr-xr-xbase/gfx/gtk_util.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/base/gfx/gtk_util.h b/base/gfx/gtk_util.h
index bf6e6aa..40a7855 100755
--- a/base/gfx/gtk_util.h
+++ b/base/gfx/gtk_util.h
@@ -11,6 +11,11 @@ typedef struct _GdkPixbuf GdkPixbuf;
typedef struct _GdkRegion GdkRegion;
class SkBitmap;
+// Define a macro for creating GdkColors from RGB values. This is a macro to
+// allow static construction of literals, etc. Use this like:
+// GdkColor white = GDK_COLOR_RGB(0xff, 0xff, 0xff);
+#define GDK_COLOR_RGB(r, g, b) {0, r * 257, g * 257, b * 257}
+
namespace gfx {
class Rect;