diff --git a/doc/en/Gdk/GC.xml b/doc/en/Gdk/GC.xml
index 89aa8280b..7fffa04b7 100644
--- a/doc/en/Gdk/GC.xml
+++ b/doc/en/Gdk/GC.xml
@@ -435,9 +435,11 @@
a Gdk.Colormap
a Gdk.Colormap
- Sets the colormap for the GC to the given
- colormap. The depth of the colormap's visual must match the
- depth of the drawable for which the GC was created.
+
+ Fetches or changes the colormap of the GC. The depth of
+ the colormap's visual must match the depth of the drawable
+ for which the GC was created.
+
@@ -480,7 +482,34 @@
the new foreground color.
the new foreground color.
- Sets the foreground color for a graphics context.
+
+ Sets the foreground color for a graphics context to the
+ given color. The color must have been allocated for this
+ to work.
+
+
+
+ Gdk.GC my_gc = new Gdk.GC (gdk_window);
+
+ //
+ // Create the color
+ //
+ Gdk.Color red_color = new Gdk.Color (0xff, 0, 0);
+
+ //
+ // Allocate it
+ //
+ Gdk.Colormap colormap = Gdk.Colormap.System;
+ colormap.AllocColor (ref red_color, true, true);
+
+ my_gc.Foreground = red_color;
+
+ //
+ // Draw diagonal, using the GC with the red color
+ //
+ gdk_window.DrawLine (my_gc, 0, 0, 100, 100);
+
+
@@ -579,8 +608,43 @@
the new background color.
the new background color.
- Sets the background color for a graphics
- context.
+
+ Sets the background color for a graphics
+ context. The color must have been allocated.
+
+
+
+ Gdk.GC my_gc = new Gdk.GC (gdk_window);
+
+ //
+ // Create the color
+ //
+ Gdk.Color back_color = new Gdk.Color (0xff, 0, 0);
+ Gdk.Color fore_color = new Gdk.Color (0, 0, 0xff);
+
+ //
+ // Allocate them
+ //
+ Gdk.Colormap colormap = Gdk.Colormap.System;
+ colormap.AllocColor (ref back_color, true, true);
+ Gdk.Colormap colormap = Gdk.Colormap.System;
+ colormap.AllocColor (ref fore_color, true, true);
+
+ my_gc.Background = back_color;
+ my_gc.Background = fore_color;
+
+ //
+ // Draw a thick line, alternating between foreground and
+ // background colors
+ //
+ my_gc.SetLineAttributes (3, LineStyle.DoubleDash, CapStyle.NotLast, JoinStyle.Round);
+
+ //
+ // Draw diagonal, using the GC with the red color
+ //
+ gdk_window.DrawLine (my_gc, 0, 0, 100, 100);
+
+