Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

gtk2::gdk::gc(3) [suse man page]

Gtk2::Gdk::GC(3)					User Contributed Perl Documentation					  Gtk2::Gdk::GC(3)

NAME
Gtk2::Gdk::GC HIERARCHY
Glib::Object +----Gtk2::Gdk::GC METHODS
gc = Gtk2::Gdk::GC->new ($drawable, $values=undef) o $drawable (Gtk2::Gdk::Drawable) o $values (scalar) 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) o $drawable (Gtk2::Gdk::Drawable) o $values (scalar) $gc->set_background ($color) o $color (Gtk2::Gdk::Color) $gc->set_clip_mask ($mask) o $mask (scalar) $gc->set_clip_origin ($x, $y) o $x (integer) o $y (integer) $gc->set_clip_rectangle ($rectangle) o $rectangle (Gtk2::Gdk::Rectangle or undef) $gc->set_clip_region ($region) o $region (Gtk2::Gdk::Region or undef) colormap = $gc->get_colormap $gc->set_colormap ($colormap) o $colormap (Gtk2::Gdk::Colormap) $dst_gc->copy ($src_gc) o $src_gc (Gtk2::Gdk::GC) $gc->set_dashes ($dash_offset, ...) o $dash_offset (integer) o ... (list) of integers, the length of the dash segments 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) o $exposures (boolean) $gc->set_fill ($fill) o $fill (Gtk2::Gdk::Fill) $gc->set_font ($font) o $font (Gtk2::Gdk::Font) $gc->set_foreground ($color) o $color (Gtk2::Gdk::Color) $gc->set_function ($function) o $function (Gtk2::Gdk::Function) $gc->set_line_attributes ($line_width, $line_style, $cap_style, $join_style) o $line_width (integer) o $line_style (Gtk2::Gdk::LineStyle) o $cap_style (Gtk2::Gdk::CapStyle) o $join_style (Gtk2::Gdk::JoinStyle) $gc->offset ($x_offset, $y_offset) o $x_offset (integer) o $y_offset (integer) $gc->set_rgb_background ($rgb) o $rgb (unsigned) $gc->set_rgb_bg_color ($color) o $color (Gtk2::Gdk::Color) $gc->set_rgb_fg_color ($color) o $color (Gtk2::Gdk::Color) $gc->set_rgb_foreground ($rgb) o $rgb (unsigned) $gc->rgb_gc_set_background ($rgb) o $rgb (unsigned) $gc->rgb_gc_set_foreground ($rgb) o $rgb (unsigned) screen = $gc->get_screen Since: gtk+ 2.2 $gc->set_stipple ($stipple) o $stipple (Gtk2::Gdk::Pixmap) $gc->set_subwindow ($mode) o $mode (Gtk2::Gdk::SubwindowMode) $gc->set_tile ($tile) o $tile (Gtk2::Gdk::Pixmap) $gc->set_ts_origin ($x, $y) o $x (integer) o $y (integer) 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) o $values (scalar) 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. ENUMS AND FLAGS
enum Gtk2::Gdk::CapStyle o 'not-last' / 'GDK_CAP_NOT_LAST' o 'butt' / 'GDK_CAP_BUTT' o 'round' / 'GDK_CAP_ROUND' o 'projecting' / 'GDK_CAP_PROJECTING' enum Gtk2::Gdk::Fill o 'solid' / 'GDK_SOLID' o 'tiled' / 'GDK_TILED' o 'stippled' / 'GDK_STIPPLED' o 'opaque-stippled' / 'GDK_OPAQUE_STIPPLED' enum Gtk2::Gdk::Function o 'copy' / 'GDK_COPY' o 'invert' / 'GDK_INVERT' o 'xor' / 'GDK_XOR' o 'clear' / 'GDK_CLEAR' o 'and' / 'GDK_AND' o 'and-reverse' / 'GDK_AND_REVERSE' o 'and-invert' / 'GDK_AND_INVERT' o 'noop' / 'GDK_NOOP' o 'or' / 'GDK_OR' o 'equiv' / 'GDK_EQUIV' o 'or-reverse' / 'GDK_OR_REVERSE' o 'copy-invert' / 'GDK_COPY_INVERT' o 'or-invert' / 'GDK_OR_INVERT' o 'nand' / 'GDK_NAND' o 'nor' / 'GDK_NOR' o 'set' / 'GDK_SET' enum Gtk2::Gdk::JoinStyle o 'miter' / 'GDK_JOIN_MITER' o 'round' / 'GDK_JOIN_ROUND' o 'bevel' / 'GDK_JOIN_BEVEL' enum Gtk2::Gdk::LineStyle o 'solid' / 'GDK_LINE_SOLID' o 'on-off-dash' / 'GDK_LINE_ON_OFF_DASH' o 'double-dash' / 'GDK_LINE_DOUBLE_DASH' enum Gtk2::Gdk::SubwindowMode o 'clip-by-children' / 'GDK_CLIP_BY_CHILDREN' o 'include-inferiors' / 'GDK_INCLUDE_INFERIORS' SEE ALSO
Gtk2, Glib::Object COPYRIGHT
Copyright (C) 2003-2008 by the gtk2-perl team. This software is licensed under the LGPL. See Gtk2 for a full notice. perl v5.12.1 2010-07-05 Gtk2::Gdk::GC(3)
Man Page