Gtk2::Gdk::GC Glib::Object +----Gtk2::Gdk::GC

gc = Gtk2::Gdk::GC->new ($drawable, $values=undef)
Create and return a new GC. $drawable is used for the depth and the display ("Gtk2::Gdk::Display") for the GC. The GC can then be used with any drawable of the same depth on that display. $values is a hashref containing some of the following keys, foreground Gtk2::Gdk::Color background Gtk2::Gdk::Color font Gtk2::Gdk::Font function Gtk2::Gdk::Function enum fill Gtk2::Gdk::Fill enum tile Gtk2::Gdk::Pixmap stipple Gtk2::Gdk::Pixmap clip_mask Gtk2::Gdk::Pixmap subwindow_mode Gtk2::Gdk::SubwindowMode enum ts_x_origin integer ts_y_origin integer clip_x_origin integer clip_y_origin integer graphics_exposures boolean integer 1 or 0 line_width integer line_style Gtk2::Gdk::LineStyle enum cap_style Gtk2::Gdk::CapStyle enum join_style Gtk2::Gdk::JoinStyle enum Keys not given get default values. For the "foreground" and "background" colour objects only the "pixel" field is used; the red, green and blue are ignored. For example my $pixel = 0x123456; my $color = Gtk2::Gdk::Color->new (0,0,0, $pixel); my $gc = Gtk2::Gdk::GC->new_with_values ($win, { foreground => $color, line_style => 'on_off_dash' });

gc = Gtk2::Gdk::GC->new_with_values ($drawable, $values=undef)

$gc->set_background ($color)

$gc->set_clip_mask ($mask)

$gc->set_clip_origin ($x, $y)

$gc->set_clip_rectangle ($rectangle)

$gc->set_clip_region ($region)

colormap = $gc->get_colormap

$gc->set_colormap ($colormap)

$dst_gc->copy ($src_gc)

$gc->set_dashes ($dash_offset, ...)
Sets the way dashed-lines are drawn. Lines will be drawn with alternating on and off segments of the lengths specified in list of dashes. The manner in which the on and off segments are drawn is determined by the line_style value of the GC.

$gc->set_exposures ($exposures)

$gc->set_fill ($fill)

$gc->set_font ($font)

$gc->set_foreground ($color)

$gc->set_function ($function)

$gc->set_line_attributes ($line_width, $line_style, $cap_style, $join_style)

$gc->offset ($x_offset, $y_offset)

$gc->set_rgb_background ($rgb)

$gc->set_rgb_bg_color ($color)

$gc->set_rgb_fg_color ($color)

$gc->set_rgb_foreground ($rgb)

$gc->rgb_gc_set_background ($rgb)

$gc->rgb_gc_set_foreground ($rgb)

screen = $gc->get_screen
Since: gtk+ 2.2

$gc->set_stipple ($stipple)

$gc->set_subwindow ($mode)

$gc->set_tile ($tile)

$gc->set_ts_origin ($x, $y)

scalar = $gc->get_values
Return the attributes of $gc in the form of a hashref with keys and values as described with "new" above. In the "foreground" and "background" colour objects returned only the "pixel" fields are set; the red, green and blue fields are garbage.

$gc->set_values ($values)
Set some of the attributes of $gc. $values is a hashref of keys and values as described for "new" and "new_with_values" above. Fields not present in $values are left unchanged.

enum Gtk2::Gdk::CapStyle

enum Gtk2::Gdk::Fill

enum Gtk2::Gdk::Function

enum Gtk2::Gdk::JoinStyle

enum Gtk2::Gdk::LineStyle

enum Gtk2::Gdk::SubwindowMode
Gtk2, Glib::Object Copyright (C) 2003-2008 by the gtk2-perl team. This software is licensed under the LGPL. See Gtk2 for a full notice.