.\" 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::Image 3pm" .TH Gtk2::Gdk::Image 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::Image \- wrapper for GdkImage .SH "DESCRIPTION" .IX Header "DESCRIPTION" A \f(CW\*(C`Gtk2::Gdk::Image\*(C'\fR is a 2\-D array of pixel values in client-side memory. It can optionally use shared memory with the X server for fast copying to or from a window or pixmap. .PP If you're thinking of using this then look at \f(CW\*(C`Gtk2::Gdk::Pixbuf\*(C'\fR first. GdkPixbuf has many more features, in particular file read and write (\s-1PNG, JPEG,\s0 etc). But a GdkImage lets you work directly in pixel values instead of expanding to \s-1RGB\s0 components. .PP See Gtk2::Gdk::Drawable for \f(CW\*(C`draw_image\*(C'\fR, \f(CW\*(C`get_image\*(C'\fR and \&\f(CW\*(C`copy_to_image\*(C'\fR methods to draw or fetch images to or from a window or pixmap. .PP The various \f(CW\*(C`get\*(C'\fR methods are Gtk 2.22 style. For previous versions they're direct field access. .SH "HIERARCHY" .IX Header "HIERARCHY" .Vb 2 \& Glib::Object \& +\-\-\-\-Gtk2::Gdk::Image .Ve .SH "METHODS" .IX Header "METHODS" .ie n .SS "image or undef = Gtk2::Gdk::Image\->\fBnew\fP ($type, $visual, $width, $height)" .el .SS "image or undef = Gtk2::Gdk::Image\->\fBnew\fP ($type, \f(CW$visual\fP, \f(CW$width\fP, \f(CW$height\fP)" .IX Subsection "image or undef = Gtk2::Gdk::Image->new ($type, $visual, $width, $height)" .IP "\(bu" 4 \&\f(CW$type\fR (Gtk2::Gdk::ImageType) .IP "\(bu" 4 \&\f(CW$visual\fR (Gtk2::Gdk::Visual) .IP "\(bu" 4 \&\f(CW$width\fR (integer) .IP "\(bu" 4 \&\f(CW$height\fR (integer) .ie n .SS "integer = $image\->\fBget_bits_per_pixel\fP" .el .SS "integer = \f(CW$image\fP\->\fBget_bits_per_pixel\fP" .IX Subsection "integer = $image->get_bits_per_pixel" .ie n .SS "byteorder = $image\->\fBget_byte_order\fP" .el .SS "byteorder = \f(CW$image\fP\->\fBget_byte_order\fP" .IX Subsection "byteorder = $image->get_byte_order" .ie n .SS "integer = $image\->\fBget_bytes_per_line\fP" .el .SS "integer = \f(CW$image\fP\->\fBget_bytes_per_line\fP" .IX Subsection "integer = $image->get_bytes_per_line" .ie n .SS "integer = $image\->\fBget_bytes_per_pixel\fP" .el .SS "integer = \f(CW$image\fP\->\fBget_bytes_per_pixel\fP" .IX Subsection "integer = $image->get_bytes_per_pixel" .ie n .SS "colormap = $image\->\fBget_colormap\fP" .el .SS "colormap = \f(CW$image\fP\->\fBget_colormap\fP" .IX Subsection "colormap = $image->get_colormap" .ie n .SS "$image\->\fBset_colormap\fP ($colormap)" .el .SS "\f(CW$image\fP\->\fBset_colormap\fP ($colormap)" .IX Subsection "$image->set_colormap ($colormap)" .IP "\(bu" 4 \&\f(CW$colormap\fR (Gtk2::Gdk::Colormap) .ie n .SS "integer = $image\->\fBget_depth\fP" .el .SS "integer = \f(CW$image\fP\->\fBget_depth\fP" .IX Subsection "integer = $image->get_depth" .ie n .SS "integer = $image\->\fBget_height\fP" .el .SS "integer = \f(CW$image\fP\->\fBget_height\fP" .IX Subsection "integer = $image->get_height" .ie n .SS "imagetype = $image\->\fBget_image_type\fP" .el .SS "imagetype = \f(CW$image\fP\->\fBget_image_type\fP" .IX Subsection "imagetype = $image->get_image_type" .ie n .SS "unsigned = $image\->\fBget_pixel\fP ($x, $y)" .el .SS "unsigned = \f(CW$image\fP\->\fBget_pixel\fP ($x, \f(CW$y\fP)" .IX Subsection "unsigned = $image->get_pixel ($x, $y)" .IP "\(bu" 4 \&\f(CW$x\fR (integer) .IP "\(bu" 4 \&\f(CW$y\fR (integer) .ie n .SS "string = $image\->\fBget_pixels\fP()" .el .SS "string = \f(CW$image\fP\->\fBget_pixels\fP()" .IX Subsection "string = $image->get_pixels()" Return a copy of the raw pixel data memory from \f(CW$image\fR. This is \&\f(CW\*(C`bytes_per_line * height\*(C'\fR many bytes. .ie n .SS "$image\->\fBput_pixel\fP ($x, $y, $pixel)" .el .SS "\f(CW$image\fP\->\fBput_pixel\fP ($x, \f(CW$y\fP, \f(CW$pixel\fP)" .IX Subsection "$image->put_pixel ($x, $y, $pixel)" .IP "\(bu" 4 \&\f(CW$x\fR (integer) .IP "\(bu" 4 \&\f(CW$y\fR (integer) .IP "\(bu" 4 \&\f(CW$pixel\fR (unsigned) .ie n .SS "visual = $image\->\fBget_visual\fP" .el .SS "visual = \f(CW$image\fP\->\fBget_visual\fP" .IX Subsection "visual = $image->get_visual" .ie n .SS "integer = $image\->\fBget_width\fP" .el .SS "integer = \f(CW$image\fP\->\fBget_width\fP" .IX Subsection "integer = $image->get_width" .SH "ENUMS AND FLAGS" .IX Header "ENUMS AND FLAGS" .SS "enum Gtk2::Gdk::ByteOrder" .IX Subsection "enum Gtk2::Gdk::ByteOrder" .IP "\(bu" 4 \&'lsb\-first' / '\s-1GDK_LSB_FIRST\s0' .IP "\(bu" 4 \&'msb\-first' / '\s-1GDK_MSB_FIRST\s0' .SS "enum Gtk2::Gdk::ImageType" .IX Subsection "enum Gtk2::Gdk::ImageType" .IP "\(bu" 4 \&'normal' / '\s-1GDK_IMAGE_NORMAL\s0' .IP "\(bu" 4 \&'shared' / '\s-1GDK_IMAGE_SHARED\s0' .IP "\(bu" 4 \&'fastest' / '\s-1GDK_IMAGE_FASTEST\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.