.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Gtk2::Gdk::GC 3pm" .TH Gtk2::Gdk::GC 3pm "2019-09-16" "perl v5.28.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Gtk2::Gdk::GC \- wrapper for GdkGC .SH "HIERARCHY" .IX Header "HIERARCHY" .Vb 2 \& Glib::Object \& +\-\-\-\-Gtk2::Gdk::GC .Ve .SH "METHODS" .IX Header "METHODS" .ie n .SS "gc = Gtk2::Gdk::GC\->\fBnew\fP ($drawable, $values=undef)" .el .SS "gc = Gtk2::Gdk::GC\->\fBnew\fP ($drawable, \f(CW$values\fP=undef)" .IX Subsection "gc = Gtk2::Gdk::GC->new ($drawable, $values=undef)" .IP "\(bu" 4 \&\f(CW$drawable\fR (Gtk2::Gdk::Drawable) .IP "\(bu" 4 \&\f(CW$values\fR (scalar) .PP Create and return a new \s-1GC.\s0 .PP \&\f(CW$drawable\fR is used for the depth and the display (\f(CW\*(C`Gtk2::Gdk::Display\*(C'\fR) for the \s-1GC.\s0 The \s-1GC\s0 can then be used with any drawable of the same depth on that display. .PP \&\f(CW$values\fR is a hashref containing some of the following keys, .PP .Vb 10 \& 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 .Ve .PP Keys not given get default values. For the \f(CW\*(C`foreground\*(C'\fR and \&\f(CW\*(C`background\*(C'\fR colour objects only the \f(CW\*(C`pixel\*(C'\fR field is used; the red, green and blue are ignored. For example .PP .Vb 5 \& 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 => \*(Aqon_off_dash\*(Aq }); .Ve .ie n .SS "gc = Gtk2::Gdk::GC\->\fBnew_with_values\fP ($drawable, $values=undef)" .el .SS "gc = Gtk2::Gdk::GC\->\fBnew_with_values\fP ($drawable, \f(CW$values\fP=undef)" .IX Subsection "gc = Gtk2::Gdk::GC->new_with_values ($drawable, $values=undef)" .IP "\(bu" 4 \&\f(CW$drawable\fR (Gtk2::Gdk::Drawable) .IP "\(bu" 4 \&\f(CW$values\fR (scalar) .ie n .SS "$gc\->\fBset_background\fP ($color)" .el .SS "\f(CW$gc\fP\->\fBset_background\fP ($color)" .IX Subsection "$gc->set_background ($color)" .IP "\(bu" 4 \&\f(CW$color\fR (Gtk2::Gdk::Color) .ie n .SS "$gc\->\fBset_clip_mask\fP ($mask)" .el .SS "\f(CW$gc\fP\->\fBset_clip_mask\fP ($mask)" .IX Subsection "$gc->set_clip_mask ($mask)" .IP "\(bu" 4 \&\f(CW$mask\fR (scalar) .ie n .SS "$gc\->\fBset_clip_origin\fP ($x, $y)" .el .SS "\f(CW$gc\fP\->\fBset_clip_origin\fP ($x, \f(CW$y\fP)" .IX Subsection "$gc->set_clip_origin ($x, $y)" .IP "\(bu" 4 \&\f(CW$x\fR (integer) .IP "\(bu" 4 \&\f(CW$y\fR (integer) .ie n .SS "$gc\->\fBset_clip_rectangle\fP ($rectangle)" .el .SS "\f(CW$gc\fP\->\fBset_clip_rectangle\fP ($rectangle)" .IX Subsection "$gc->set_clip_rectangle ($rectangle)" .IP "\(bu" 4 \&\f(CW$rectangle\fR (Gtk2::Gdk::Rectangle or undef) .ie n .SS "$gc\->\fBset_clip_region\fP ($region)" .el .SS "\f(CW$gc\fP\->\fBset_clip_region\fP ($region)" .IX Subsection "$gc->set_clip_region ($region)" .IP "\(bu" 4 \&\f(CW$region\fR (Gtk2::Gdk::Region or undef) .ie n .SS "colormap = $gc\->\fBget_colormap\fP" .el .SS "colormap = \f(CW$gc\fP\->\fBget_colormap\fP" .IX Subsection "colormap = $gc->get_colormap" .ie n .SS "$gc\->\fBset_colormap\fP ($colormap)" .el .SS "\f(CW$gc\fP\->\fBset_colormap\fP ($colormap)" .IX Subsection "$gc->set_colormap ($colormap)" .IP "\(bu" 4 \&\f(CW$colormap\fR (Gtk2::Gdk::Colormap) .ie n .SS "$dst_gc\->\fBcopy\fP ($src_gc)" .el .SS "\f(CW$dst_gc\fP\->\fBcopy\fP ($src_gc)" .IX Subsection "$dst_gc->copy ($src_gc)" .IP "\(bu" 4 \&\f(CW$src_gc\fR (Gtk2::Gdk::GC) .ie n .SS "$gc\->\fBset_dashes\fP ($dash_offset, ...)" .el .SS "\f(CW$gc\fP\->\fBset_dashes\fP ($dash_offset, ...)" .IX Subsection "$gc->set_dashes ($dash_offset, ...)" .IP "\(bu" 4 \&\f(CW$dash_offset\fR (integer) .IP "\(bu" 4 \&... (list) of integers, the length of the dash segments .PP 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 \s-1GC.\s0 .ie n .SS "$gc\->\fBset_exposures\fP ($exposures)" .el .SS "\f(CW$gc\fP\->\fBset_exposures\fP ($exposures)" .IX Subsection "$gc->set_exposures ($exposures)" .IP "\(bu" 4 \&\f(CW$exposures\fR (boolean) .ie n .SS "$gc\->\fBset_fill\fP ($fill)" .el .SS "\f(CW$gc\fP\->\fBset_fill\fP ($fill)" .IX Subsection "$gc->set_fill ($fill)" .IP "\(bu" 4 \&\f(CW$fill\fR (Gtk2::Gdk::Fill) .ie n .SS "$gc\->\fBset_font\fP ($font)" .el .SS "\f(CW$gc\fP\->\fBset_font\fP ($font)" .IX Subsection "$gc->set_font ($font)" .IP "\(bu" 4 \&\f(CW$font\fR (Gtk2::Gdk::Font) .ie n .SS "$gc\->\fBset_foreground\fP ($color)" .el .SS "\f(CW$gc\fP\->\fBset_foreground\fP ($color)" .IX Subsection "$gc->set_foreground ($color)" .IP "\(bu" 4 \&\f(CW$color\fR (Gtk2::Gdk::Color) .ie n .SS "$gc\->\fBset_function\fP ($function)" .el .SS "\f(CW$gc\fP\->\fBset_function\fP ($function)" .IX Subsection "$gc->set_function ($function)" .IP "\(bu" 4 \&\f(CW$function\fR (Gtk2::Gdk::Function) .ie n .SS "$gc\->\fBset_line_attributes\fP ($line_width, $line_style, $cap_style, $join_style)" .el .SS "\f(CW$gc\fP\->\fBset_line_attributes\fP ($line_width, \f(CW$line_style\fP, \f(CW$cap_style\fP, \f(CW$join_style\fP)" .IX Subsection "$gc->set_line_attributes ($line_width, $line_style, $cap_style, $join_style)" .IP "\(bu" 4 \&\f(CW$line_width\fR (integer) .IP "\(bu" 4 \&\f(CW$line_style\fR (Gtk2::Gdk::LineStyle) .IP "\(bu" 4 \&\f(CW$cap_style\fR (Gtk2::Gdk::CapStyle) .IP "\(bu" 4 \&\f(CW$join_style\fR (Gtk2::Gdk::JoinStyle) .ie n .SS "$gc\->\fBoffset\fP ($x_offset, $y_offset)" .el .SS "\f(CW$gc\fP\->\fBoffset\fP ($x_offset, \f(CW$y_offset\fP)" .IX Subsection "$gc->offset ($x_offset, $y_offset)" .IP "\(bu" 4 \&\f(CW$x_offset\fR (integer) .IP "\(bu" 4 \&\f(CW$y_offset\fR (integer) .ie n .SS "$gc\->\fBset_rgb_background\fP ($rgb)" .el .SS "\f(CW$gc\fP\->\fBset_rgb_background\fP ($rgb)" .IX Subsection "$gc->set_rgb_background ($rgb)" .IP "\(bu" 4 \&\f(CW$rgb\fR (unsigned) .ie n .SS "$gc\->\fBset_rgb_bg_color\fP ($color)" .el .SS "\f(CW$gc\fP\->\fBset_rgb_bg_color\fP ($color)" .IX Subsection "$gc->set_rgb_bg_color ($color)" .IP "\(bu" 4 \&\f(CW$color\fR (Gtk2::Gdk::Color) .ie n .SS "$gc\->\fBset_rgb_fg_color\fP ($color)" .el .SS "\f(CW$gc\fP\->\fBset_rgb_fg_color\fP ($color)" .IX Subsection "$gc->set_rgb_fg_color ($color)" .IP "\(bu" 4 \&\f(CW$color\fR (Gtk2::Gdk::Color) .ie n .SS "$gc\->\fBset_rgb_foreground\fP ($rgb)" .el .SS "\f(CW$gc\fP\->\fBset_rgb_foreground\fP ($rgb)" .IX Subsection "$gc->set_rgb_foreground ($rgb)" .IP "\(bu" 4 \&\f(CW$rgb\fR (unsigned) .ie n .SS "$gc\->\fBrgb_gc_set_background\fP ($rgb)" .el .SS "\f(CW$gc\fP\->\fBrgb_gc_set_background\fP ($rgb)" .IX Subsection "$gc->rgb_gc_set_background ($rgb)" .IP "\(bu" 4 \&\f(CW$rgb\fR (unsigned) .ie n .SS "$gc\->\fBrgb_gc_set_foreground\fP ($rgb)" .el .SS "\f(CW$gc\fP\->\fBrgb_gc_set_foreground\fP ($rgb)" .IX Subsection "$gc->rgb_gc_set_foreground ($rgb)" .IP "\(bu" 4 \&\f(CW$rgb\fR (unsigned) .ie n .SS "screen = $gc\->\fBget_screen\fP" .el .SS "screen = \f(CW$gc\fP\->\fBget_screen\fP" .IX Subsection "screen = $gc->get_screen" Since: gtk+ 2.2 .ie n .SS "$gc\->\fBset_stipple\fP ($stipple)" .el .SS "\f(CW$gc\fP\->\fBset_stipple\fP ($stipple)" .IX Subsection "$gc->set_stipple ($stipple)" .IP "\(bu" 4 \&\f(CW$stipple\fR (Gtk2::Gdk::Pixmap) .ie n .SS "$gc\->\fBset_subwindow\fP ($mode)" .el .SS "\f(CW$gc\fP\->\fBset_subwindow\fP ($mode)" .IX Subsection "$gc->set_subwindow ($mode)" .IP "\(bu" 4 \&\f(CW$mode\fR (Gtk2::Gdk::SubwindowMode) .ie n .SS "$gc\->\fBset_tile\fP ($tile)" .el .SS "\f(CW$gc\fP\->\fBset_tile\fP ($tile)" .IX Subsection "$gc->set_tile ($tile)" .IP "\(bu" 4 \&\f(CW$tile\fR (Gtk2::Gdk::Pixmap) .ie n .SS "$gc\->\fBset_ts_origin\fP ($x, $y)" .el .SS "\f(CW$gc\fP\->\fBset_ts_origin\fP ($x, \f(CW$y\fP)" .IX Subsection "$gc->set_ts_origin ($x, $y)" .IP "\(bu" 4 \&\f(CW$x\fR (integer) .IP "\(bu" 4 \&\f(CW$y\fR (integer) .ie n .SS "scalar = $gc\->\fBget_values\fP" .el .SS "scalar = \f(CW$gc\fP\->\fBget_values\fP" .IX Subsection "scalar = $gc->get_values" Return the attributes of \f(CW$gc\fR in the form of a hashref with keys and values as described with \f(CW\*(C`new\*(C'\fR above. .PP In the \f(CW\*(C`foreground\*(C'\fR and \f(CW\*(C`background\*(C'\fR colour objects returned only the \f(CW\*(C`pixel\*(C'\fR fields are set; the red, green and blue fields are garbage. .ie n .SS "$gc\->\fBset_values\fP ($values)" .el .SS "\f(CW$gc\fP\->\fBset_values\fP ($values)" .IX Subsection "$gc->set_values ($values)" .IP "\(bu" 4 \&\f(CW$values\fR (scalar) .PP Set some of the attributes of \f(CW$gc\fR. \f(CW$values\fR is a hashref of keys and values as described for \f(CW\*(C`new\*(C'\fR and \f(CW\*(C`new_with_values\*(C'\fR above. Fields not present in \f(CW$values\fR are left unchanged. .SH "ENUMS AND FLAGS" .IX Header "ENUMS AND FLAGS" .SS "enum Gtk2::Gdk::CapStyle" .IX Subsection "enum Gtk2::Gdk::CapStyle" .IP "\(bu" 4 \&'not\-last' / '\s-1GDK_CAP_NOT_LAST\s0' .IP "\(bu" 4 \&'butt' / '\s-1GDK_CAP_BUTT\s0' .IP "\(bu" 4 \&'round' / '\s-1GDK_CAP_ROUND\s0' .IP "\(bu" 4 \&'projecting' / '\s-1GDK_CAP_PROJECTING\s0' .SS "enum Gtk2::Gdk::Fill" .IX Subsection "enum Gtk2::Gdk::Fill" .IP "\(bu" 4 \&'solid' / '\s-1GDK_SOLID\s0' .IP "\(bu" 4 \&'tiled' / '\s-1GDK_TILED\s0' .IP "\(bu" 4 \&'stippled' / '\s-1GDK_STIPPLED\s0' .IP "\(bu" 4 \&'opaque\-stippled' / '\s-1GDK_OPAQUE_STIPPLED\s0' .SS "enum Gtk2::Gdk::Function" .IX Subsection "enum Gtk2::Gdk::Function" .IP "\(bu" 4 \&'copy' / '\s-1GDK_COPY\s0' .IP "\(bu" 4 \&'invert' / '\s-1GDK_INVERT\s0' .IP "\(bu" 4 \&'xor' / '\s-1GDK_XOR\s0' .IP "\(bu" 4 \&'clear' / '\s-1GDK_CLEAR\s0' .IP "\(bu" 4 \&'and' / '\s-1GDK_AND\s0' .IP "\(bu" 4 \&'and\-reverse' / '\s-1GDK_AND_REVERSE\s0' .IP "\(bu" 4 \&'and\-invert' / '\s-1GDK_AND_INVERT\s0' .IP "\(bu" 4 \&'noop' / '\s-1GDK_NOOP\s0' .IP "\(bu" 4 \&'or' / '\s-1GDK_OR\s0' .IP "\(bu" 4 \&'equiv' / '\s-1GDK_EQUIV\s0' .IP "\(bu" 4 \&'or\-reverse' / '\s-1GDK_OR_REVERSE\s0' .IP "\(bu" 4 \&'copy\-invert' / '\s-1GDK_COPY_INVERT\s0' .IP "\(bu" 4 \&'or\-invert' / '\s-1GDK_OR_INVERT\s0' .IP "\(bu" 4 \&'nand' / '\s-1GDK_NAND\s0' .IP "\(bu" 4 \&'nor' / '\s-1GDK_NOR\s0' .IP "\(bu" 4 \&'set' / '\s-1GDK_SET\s0' .SS "enum Gtk2::Gdk::JoinStyle" .IX Subsection "enum Gtk2::Gdk::JoinStyle" .IP "\(bu" 4 \&'miter' / '\s-1GDK_JOIN_MITER\s0' .IP "\(bu" 4 \&'round' / '\s-1GDK_JOIN_ROUND\s0' .IP "\(bu" 4 \&'bevel' / '\s-1GDK_JOIN_BEVEL\s0' .SS "enum Gtk2::Gdk::LineStyle" .IX Subsection "enum Gtk2::Gdk::LineStyle" .IP "\(bu" 4 \&'solid' / '\s-1GDK_LINE_SOLID\s0' .IP "\(bu" 4 \&'on\-off\-dash' / '\s-1GDK_LINE_ON_OFF_DASH\s0' .IP "\(bu" 4 \&'double\-dash' / '\s-1GDK_LINE_DOUBLE_DASH\s0' .SS "enum Gtk2::Gdk::SubwindowMode" .IX Subsection "enum Gtk2::Gdk::SubwindowMode" .IP "\(bu" 4 \&'clip\-by\-children' / '\s-1GDK_CLIP_BY_CHILDREN\s0' .IP "\(bu" 4 \&'include\-inferiors' / '\s-1GDK_INCLUDE_INFERIORS\s0' .SH "SEE ALSO" .IX Header "SEE ALSO" Gtk2, Glib::Object .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (C) 2003\-2011 by the gtk2\-perl team. .PP This software is licensed under the \s-1LGPL.\s0 See Gtk2 for a full notice.