gdk-sharp 2.12.0.0 Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. GLib.Object Represents a graphics context

The Gdk.GC class is used to represent a graphics context.

A number of resources are used when performing graphics operations. Most information about performing graphics (for example, foreground color, background color, line style, and so on) is stored in resources called graphics contexts (GCs). Most graphics operations take a GC as an argument.

Graphics operations can be performed to either windows () or pixmaps (), which collectively are called drawables (). Each drawable exists on a single screen. A GC is created for a specific screen and drawable depth and can only be used with drawables of matching screen and depth.

- Constructor
  2.12.0.0
  To be added: an object of type 'Gdk.Drawable'
  To be added
  To be added
- Constructor
  2.12.0.0
  System.Obsolete
  a
  Internal constructor
  This is a constructor used by derivative types of that would have their own GLib.GType assigned to it. This is not typically used by C# code.
- Constructor
  2.12.0.0
  Pointer to the C object.
  Internal constructor

  This is an internal constructor, and should not be used by user code.

- Constructor
  2.12.0.0
  To be added: an object of type 'Gdk.Drawable'
  To be added: an object of type 'Gdk.GCValues'
  To be added: an object of type 'Gdk.GCValuesMask'
  To be added
  To be added
- Property
  2.12.0.0
  Gdk.Color Sets the background color for a graphics context. the new background color.

  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);`
- Property
  2.12.0.0
  Gdk.Pixmap Sets the clip mask for a graphics context from a bitmap. a bitmap.

  Sets the clip mask for a graphics context from a bitmap. The clip mask is interpreted relative to the clip origin. (See ).

- Property
  2.12.0.0
  Gdk.Rectangle Sets the clip mask for a graphics context from a rectangle. an object of type 'Gdk.Rectangle'

  Sets the clip mask for a graphics context from a rectangle. The clip mask is interpreted relative to the clip origin. (See ).

- Property
  2.12.0.0
  Gdk.Region Sets the clip mask for a graphics context from a region structure. the Gdk.Region

  Sets the clip mask for a graphics context from a region structure. The clip mask is interpreted relative to the clip origin. (See ).

- Property
  2.12.0.0
  Gdk.Colormap Sets the colormap for the GC to the given colormap. a Gdk.Colormap

  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.

- Method
  2.12.0.0
  System.Void `` The GC to copy. Copy the set of values from one graphics context onto another graphics context.

  Copies the settings of the graphics context into this GC.

- Property
  2.12.0.0
  System.Boolean Sets whether or not this GC should geenrate exposure events. To be added: an object of type 'bool'

  Sets whether copying non-visible portions of a drawable using this graphics context generate exposure events for the corresponding regions of the destination drawable. (See ).

- Property
  2.12.0.0
  Gdk.Fill Set the fill mode for a graphics context. the new fill mode.

  Set the fill mode for a graphics context.

- Property
  2.12.0.0
  System.Obsolete
  Gdk.Font To be added a To be added
- Property
  2.12.0.0
  Gdk.Color Sets the foreground color for a graphics context. the new foreground color.

  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);`
- Property
  2.12.0.0
  Gdk.Function Determines how the current pixel values and the pixel values being drawn are combined to produce the final pixel values. a function.

  Determines how the current pixel values and the pixel values being drawn are combined to produce the final pixel values.

- Method
  2.12.0.0
  System.Void `` the structure in which to store the results. Retrieves the current values from a graphics context.

  Retrieves the current values from a graphics context.

- Property
  2.12.0.0
  GLib.GType GType Property. a Returns the native value for .
- Method
  2.12.0.0
  System.Void `` `` amount by which to offset the GC in the X direction amount by which to offset the GC in the Y direction Set the x and y offsets on the Gdk.GC

  Offset attributes such as the clip and tile-stipple origins of the GC so that drawing at x - x_offset, y - y_offset with the offset GC has the same effect as drawing at x, y with the original GC.

- Method
  2.12.0.0
  System.Obsolete
  Gdk.GC To be added a To be added
- Property
  2.12.0.0
  Gdk.Color Set the background color of a GC using an unallocated color. a Gdk.Color

  Set the background color of a GC using an unallocated color. The pixel value for the color will be determined using GdkRGB. If the colormap for the GC has not previously been initialized for GdkRGB, then for pseudo-color colormaps (colormaps with a small modifiable number of colors), a colorcube will be allocated in the colormap.

  Calling this function for a GC without a colormap is an error.

- Property
  2.12.0.0
  Gdk.Color Set the foreground color of a GC using an unallocated color. an object of type 'Gdk.Color'

  Set the foreground color of a GC using an unallocated color. The pixel value for the color will be determined using GdkRGB. If the colormap for the GC has not previously been initialized for GdkRGB, then for pseudo-color colormaps (colormaps with a small modifiable number of colors), a colorcube will be allocated in the colormap.

  Calling this function for a GC without a colormap is an error.

- Property
  2.12.0.0
  Gdk.Screen To be added a To be added
- Method
  2.12.0.0
  System.Void `` `` the x-coordinate of the origin. the y-coordinate of the origin. Sets the origin of the clip mask.

  Sets the origin of the clip mask. The coordinates are interpreted relative to the upper-left corner of the destination drawable of the current operation.

- Method
  2.12.0.0
  System.Void `` `` `` the dash offset. an array of dash lengths. the number of elemenst in dash_list. Sets the way dashed-lines are drawn.

  Sets the way dashed-lines are drawn. Lines will be drawn with alternating on and off segments of the lengths specified in dash_list. The manner in which the on and off segments are drawn is determined by the line_style value of the GC. (This can be changed with Gdk.GC.SetLineAttributes())

- Method
  2.12.0.0
  System.Void `` `` `` `` the width of lines. the dash-style for lines. the manner in which the ends of lines are drawn. the way in which lines are joined together. Sets various attributes of how lines are drawn.

  Sets various attributes of how lines are drawn. See the corresponding members of Gdk.GC.Values for full explanations of the arguments.

- Method
  2.12.0.0
  System.Void `` `` the x-coordinate of the origin. the y-coordinate of the origin. Set the origin when using tiles or stipples with the GC.

  Set the origin when using tiles or stipples with the GC. The tile or stipple will be aligned such that the upper left corner of the tile or stipple will coincide with this point.

- Method
  2.12.0.0
  System.Void `` `` struct containing the new values mask indicating which struct fields are to be used Sets attributes of a graphics context in bulk.

  Sets attributes of a graphics context in bulk. For each flag set in values_mask, the corresponding field will be read from values and set as the new value for gc. If you're only setting a few values on gc, calling individual "setter" functions is likely more convenient.

- Property
  2.12.0.0
  Gdk.Pixmap Set the stipple bitmap for a graphics context. the new stipple bitmap.

  Set the stipple bitmap for a graphics context. The stipple will only be used if the fill mode is or .

- Property
  2.12.0.0
  Gdk.SubwindowMode Sets how drawing with this GC on a window will affect child windows of that window. the subwindow mode.

  Sets how drawing with this GC on a window will affect child windows of that window.

- Property
  2.12.0.0
  Gdk.Pixmap Set a tile pixmap for a graphics context. an object of type 'Gdk.Pixmap'

  Set a tile pixmap for a graphics context. This will only be used if the fill mode is GDK_TILED.

- Method
  2.12.0.0
  System.Obsolete
  System.Void To be added To be added