GC
Object Hierarchy:
Description:
[
Deprecated ( since =
"2.22" ) ]
public class GC :
Object
Warning: GC is deprecated.
Namespace: Gdk
Package: gdk-2.0
Content:
Creation methods:
Methods:
-
public void copy (GC src_gc)
Copy the set of values from one graphics context onto another graphics context.
-
public weak Colormap get_colormap ()
Retrieves the colormap for a given GC, if it exists. A GC will have a colormap if the drawable for which
it was created has a colormap, or if a colormap was set explicitely with gdk_gc_set_colormap.
-
public weak Screen get_screen ()
Gets the Screen for which gc was created
-
public virtual void get_values (out GCValues values)
Retrieves the current values from a graphics context. Note that only the pixel values of the
values->foreground and values->background are filled, use
query_color to obtain the rgb values if you need them.
-
public void offset (int x_offset, int y_offset)
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.
-
public void set_background (Color color)
Sets the background color for a graphics context. Note that this function uses color->
pixel, use set_rgb_bg_color to specify the background color as red, green,
blue components.
-
public void set_clip_mask (Bitmap mask)
Sets the clip mask for a graphics context from a bitmap. The clip mask is interpreted relative to the
clip origin. (See set_clip_origin).
-
public void set_clip_origin (int x, int y)
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.
-
public void set_clip_rectangle (Rectangle rectangle)
Sets the clip mask for a graphics context from a rectangle. The clip mask is interpreted relative to the
clip origin. (See set_clip_origin).
-
public void set_clip_region (Region region)
Sets the clip mask for a graphics context from a region structure. The clip mask is interpreted relative
to the clip origin. (See set_clip_origin).
-
public void set_colormap (Colormap 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.
-
public virtual void set_dashes (int dash_offset, char[] dash_list, int n)
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
set_line_attributes.)
-
public void set_exposures (bool exposures)
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 draw_drawable
).
-
public void set_fill (Fill fill)
Set the fill mode for a graphics context.
-
public void set_foreground (Color color)
Sets the foreground color for a graphics context. Note that this function uses color->
pixel, use set_rgb_fg_color to specify the foreground color as red, green,
blue components.
-
public void set_function (Function function)
Determines how the current pixel values and the pixel values being drawn are combined to produce the
final pixel values.
-
public void set_line_attributes (int line_width, LineStyle line_style, CapStyle cap_style, JoinStyle join_style)
Sets various attributes of how lines are drawn. See the corresponding members of
GCValues for full explanations of the arguments.
-
public void set_rgb_bg_color (Color 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.
-
public void set_rgb_fg_color (Color 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.
-
public void set_stipple (Pixmap stipple)
Set the stipple bitmap for a graphics context. The stipple will only be used if the fill mode is
STIPPLED or
OPAQUE_STIPPLED.
-
public void set_subwindow (SubwindowMode mode)
Sets how drawing with this GC on a window will affect child windows of that window.
-
public void set_tile (Pixmap tile)
Set a tile pixmap for a graphics context. This will only be used if the fill mode is
TILED.
-
public void set_ts_origin (int x, int y)
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.
-
public virtual void set_values (GCValues values, GCValuesMask values_mask)
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.
Fields: