.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" 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" '' '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 turned on, 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. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Prima::Image::AnimateGIF 3" .TH Prima::Image::AnimateGIF 3 "2009-02-24" "perl v5.14.2" "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" Prima::Image::AnimateGIF \- animate gif files .SH "DESCRIPTION" .IX Header "DESCRIPTION" The module provides high-level access to \s-1GIF\s0 animation sequences. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 6 \& use Prima qw(Application Image::AnimateGIF); \& my $x = Prima::Image::AnimateGIF\->load($ARGV[0]); \& die $@ unless $x; \& my ( $X, $Y) = ( 0, 100); \& my $background = $::application\-> get_image( $X, $Y, $x\-> size); \& $::application\-> begin_paint; \& \& while ( my $info = $x\-> next) { \& my $frame = $background\-> dup; \& $frame\-> begin_paint; \& $x\-> draw( $frame, 0, 0); \& $::application\-> put_image( $X, $Y, $frame); \& \& $::application\-> sync; \& select(undef, undef, undef, $info\-> {delay}); \& } \& \& $::application\-> put_image( $X, $Y, $g); .Ve .ie n .SS "new $CLASS, %OPTIONS" .el .SS "new \f(CW$CLASS\fP, \f(CW%OPTIONS\fP" .IX Subsection "new $CLASS, %OPTIONS" Creates an empty animation container. If \f(CW$OPTIONS{images}\fR is given, it is expected to be an array of images, best if loaded from gif files with \&\f(CW\*(C`loadExtras\*(C'\fR and \f(CW\*(C`iconUnmask\*(C'\fR parameters set ( see Prima::image\-load for details). .ie n .SS "load $SOURCE, %OPTIONS" .el .SS "load \f(CW$SOURCE\fP, \f(CW%OPTIONS\fP" .IX Subsection "load $SOURCE, %OPTIONS" Loads \s-1GIF\s0 animation sequence from file or stream \f(CW$SOURCE\fR. Options are the same as understood by \f(CW\*(C`Prima::Image::load\*(C'\fR, and are passed down to it. .ie n .SS "add $IMAGE" .el .SS "add \f(CW$IMAGE\fP" .IX Subsection "add $IMAGE" Appends an image frame to the container. .SS "bgColor" .IX Subsection "bgColor" Return the background color specified by the \s-1GIF\s0 sequence as the preferred background color to use when there is no specific background to superimpose the animation to. .SS "current" .IX Subsection "current" Return index of the current frame .ie n .SS "draw $CANVAS, $X, $Y" .el .SS "draw \f(CW$CANVAS\fP, \f(CW$X\fP, \f(CW$Y\fP" .IX Subsection "draw $CANVAS, $X, $Y" Draws the current composite frame on \f(CW$CANVAS\fR at the given coordinates. .SS "height" .IX Subsection "height" Returns height of the composite frame. .SS "icon" .IX Subsection "icon" Creates and returns an icon object off the current composite frame. .SS "image" .IX Subsection "image" Creates and returns an image object off the current composite frame. The transparent pixels on the image are replaced with the preferred background color. .SS "is_stopped" .IX Subsection "is_stopped" Returns true if the animation sequence was stopped, false otherwise. If the sequence was stopped, the only way to restart it is to call \f(CW\*(C`reset\*(C'\fR. .SS "length" .IX Subsection "length" Returns total animation length (without repeats) in seconds. .SS "loopCount [ \s-1INTEGER\s0 ]" .IX Subsection "loopCount [ INTEGER ]" Sets and returns number of loops left, undef for indefinite. .SS "masks" .IX Subsection "masks" Return the \s-1AND\s0 and \s-1XOR\s0 masks, that can be used to display the current composite frame. .SS "next" .IX Subsection "next" Advances one animation frame. The step triggers changes to the internally kept \&\s-1AND\s0 and \s-1XOR\s0 masks that create effect of transparency, if needed. The method return a hash, where the following field are initialized: .IP "left, bottom, right, top" 4 .IX Item "left, bottom, right, top" Coordinates of the changed area since the last frame was updated. .IP "delay" 4 .IX Item "delay" Time ins seconds how long the frame is expected to be displayed. .SS "reset" .IX Subsection "reset" Resets the animation sequence. This call is necessary either when image sequence was altered, or when sequence display restart is needed. .SS "size" .IX Subsection "size" Returns width and height of the composite frame. .SS "total" .IX Subsection "total" Return number fo frames .SS "width" .IX Subsection "width" Returns width of the composite frame. .SH "SEE ALSO" .IX Header "SEE ALSO" Prima::image\-load, \&\*(L"/www.the\-labs.com/GIFMerge/ \*(R" in http: .SH "AUTHOR" .IX Header "AUTHOR" Dmitry Karasik, .