[gtk+] gdk: Add section docs for GdkRGBA
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gdk: Add section docs for GdkRGBA
- Date: Mon, 6 Dec 2010 17:58:30 +0000 (UTC)
commit 9b042e39ecd7c386031addbac5475387b06e004e
Author: Benjamin Otte <otte redhat com>
Date: Mon Dec 6 18:56:11 2010 +0100
gdk: Add section docs for GdkRGBA
gdk/gdkrgba.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/gdk/gdkrgba.c b/gdk/gdkrgba.c
index 686d89b..97c4071 100644
--- a/gdk/gdkrgba.c
+++ b/gdk/gdkrgba.c
@@ -32,12 +32,32 @@
* SECTION:rgba_colors
* @Short_description: RGBA colors
* @Title: RGBA Colors
+ *
+ * The #GdkRGBA struct is a convenient way to pass rgba colors around.
+ * It's based on cairo's way to deal with colors and mirros its behavior.
+ * All values are in the range from 0.0 to 1.0 inclusive. So the color
+ * (0.0, 0.0, 0.0, 0.0) represents transparent black and
+ * (1.0, 1.0, 1.0, 1.0) is opaque white. Other values will be clamped
+ * to this range when drawing.
*/
G_DEFINE_BOXED_TYPE (GdkRGBA, gdk_rgba,
gdk_rgba_copy, gdk_rgba_free)
/**
+ * GdkRGBA:
+ * @red: The intensity of the red channel from 0.0 to 1.0 inclusive.
+ * @green: The intensity of the green channel from 0.0 to 1.0 inclusive.
+ * @blue: The intensity of the blue channel from 0.0 to 1.0 inclusive.
+ * @alpha: The opacity of the color from 0.0 for completely translucent to
+ * 1.0 for opaque.
+ *
+ * The GdkRGBA structure is used to pass around color data. When using it
+ * as struct members or on the stack, you want to use the struct directly
+ * and not allocate it.
+ */
+
+/**
* gdk_rgba_copy:
* @rgba: a #GdkRGBA
*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]