gdk-sharp 0.0.0.0 neutral Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. 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. GLib.Object GLib.IWrapper System.IDisposable Method System.Void Copy the set of values from one graphics context onto another graphics context. The GC to copy. Copies the settings of the graphics context into this GC. Method System.Void Set the origin when using tiles or stipples with the GC. the x-coordinate of the origin. the y-coordinate of the origin. 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 System.Void Sets the origin of the clip mask. the x-coordinate of the origin. the y-coordinate of the origin. 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 System.Void Set the x and y offsets on the Gdk.GC amount by which to offset the GC in the X direction amount by which to offset the GC in the Y direction 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 System.Void Sets attributes of a graphics context in bulk. struct containing the new values mask indicating which struct fields are to be used 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. Method System.Void Sets various attributes of how lines are drawn. 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. See the corresponding members of Gdk.GC.Values for full explanations of the arguments. Method System.Void Retrieves the current values from a graphics context. the GdkGCValues structure in which to store the results. Retrieves the current values from a graphics context. Method System.Void Disposes the resources associated with the object. Constructor Internal constructor Pointer to the C object. An instance of GC, wrapping the C object. This is an internal constructor, and should not be used by user code. Constructor To be added To be added: an object of type 'Gdk.Drawable' To be added: an object of type 'Gdk.GC' To be added Constructor To be added 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: an object of type 'Gdk.GC' To be added Property 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 Gdk.Rectangle Sets the clip mask for a graphics context from a rectangle. the rectangle to clip to. 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 Gdk.Pixmap Set a tile pixmap for a graphics context. the new tile pixmap. 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. Property Gdk.Bitmap Sets the clip mask for a graphics context from a bitmap. 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 Gdk.Fill Set the fill mode for a graphics context. the new fill mode. the new fill mode. Set the fill mode for a graphics context. Property Gdk.Colormap Sets the colormap for the GC to the given colormap. a Gdk.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. Property Gdk.Color Set the background color of a GC using an unallocated color. a Gdk.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 Gdk.Color Sets the foreground color for a graphics context. the new foreground color. 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 Gdk.Region Sets the clip mask for a graphics context from a region structure. the Gdk.Region 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 Gdk.SubwindowMode Sets how drawing with this GC on a window will affect child windows of that window. the subwindow mode. the subwindow mode. Sets how drawing with this GC on a window will affect child windows of that window. Property Gdk.Pixmap Set the stipple bitmap for a graphics context. the new stipple bitmap. 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 Gdk.Function Determines how the current pixel values and the pixel values being drawn are combined to produce the final pixel values. a function. a function. Determines how the current pixel values and the pixel values being drawn are combined to produce the final pixel values. Property Gdk.Color Sets the background color for a graphics context. the new background color. 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 System.Boolean Sets whether or not this GC should geenrate exposure events. To be added: an object of type 'bool' 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 Gdk.Screen To be added a To be added Method System.Void Sets the way dashed-lines are drawn. the dash offset. an array of dash lengths. the number of elemenst in dash_list. 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()) Property GLib.GType GType Property. a Returns the native value for . Constructor Internal constructor a a 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. Property Gdk.Font To be added a To be added Method Gdk.GC To be added a To be added Method System.Void To be added To be added