KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /usr/lib64/pygtk/2.0/demos/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib64/pygtk/2.0/demos/pixbufs.pyc
mò
e‡8Hc@s¹dZdkZdkZdkZdkZdZdZeiieii	e
ƒdƒZdZdddd	d
ddd
gZ
deifd„ƒYZd„ZedjoeƒndS(sPixbufs

A GdkPixbuf represents an image, normally in RGB or RGBA format.
Pixbufs are normally used to load files from disk and perform image scaling.
This demo is not all that educational, but looks cool. It was written by
Extreme Pixbuf Hacker Federico Mena Quintero. It also shows off how to use
GtkDrawingArea to do a simple animation.
Look at the Image demo for additional pixbuf usage examples.Ni2i<timagessbackground.jpgs
apple-red.pngsgnome-applets.pngsgnome-calendar.pngsgnome-foot.pngsgnome-gmush.pngsgnome-gimp.pngsgnome-gsame.pngsgnu-keys.pngtPixbufsDemocBshtZdZdZgZdZdZdZdZ	dZdd„Z
d„Zd„Zd„Z
d„ZRS(NicCsjtii|ƒy|i|iƒƒWn&tj
o|idd„ƒnX|id|i	ƒ|i
|iiƒ|i
tƒ|iƒpEti|tititidƒ}|idd„ƒ|iƒn’|i|i|iƒtiitiitd|i|iƒ|_tiƒ}|id|iƒ|i |ƒti!t"|i#ƒ|_$|i%ƒdS(NtdestroycGs
tiƒS(N(tgtkt	main_quit(tw((t%/usr/lib64/pygtk/2.0/demos/pixbufs.pyt<lambda>0ssFailed to load an imagetresponsecCs
|iƒS(N(tdR(R	tr((RR;sitexpose_event(&RtWindowt__init__tselft
set_screentparentt
get_screentAttributeErrortconnecttcleanup_callbackt	set_titlet	__class__t__name__t
set_resizabletFalsetload_pixbufst
MessageDialogtDIALOG_DESTROY_WITH_PARENTt
MESSAGE_ERRORt
BUTTONS_CLOSEtdialogtshowtset_size_requestt
back_widthtback_heighttgdktPixbuftCOLORSPACE_RGBtframetDrawingAreatdat	expose_cbtaddttimeout_addtFRAME_DELAYttimeoutt
timeout_idtshow_all(RRR)R((RR
+s0

		
cCsæ|idj	otSny(tiitii	t
tƒƒ|_Wnti
j
o
}tSnX|iiƒ|_|iiƒ|_x\tD]T}y/|iitiitii	t
|ƒƒƒWqŠti
j
o
}tSqŠXqŠWtS(s` Loads the images for the demo and returns whether the
            operation succeeded.
        N(Rt
backgroundtNonetTrueRR$tpixbuf_new_from_filetostpathtjoint	IMAGE_DIRtBACKGROUND_NAMEtgobjecttGErrorterrorRt	get_widthR"t
get_heightR#timage_namestfilenameRtappend(RR@R<((RRLs (	/
cCsw|iiƒ}|iiƒ}|ii|i	i
|ii
|ii|ii|iid|||ii
|iiƒ
tS(s' Expose callback for the drawing area. tnormalN(RR't
get_rowstridet	rowstridet
get_pixelstpixelst	draw_areatwindowtdraw_rgb_imagetstyletblack_gcteventtareatxtytwidththeightR3(RRGRLRFRD((RR*fscCs1|idj	oti|iƒd|_ndS(N(RR/R2Rttimeout_remove(Rtwin((RRysc
Cse|iidd|i|i|iddƒt|itƒttƒ}|id}|id}t||ƒd}ttƒ}x³tD]«}ti|ƒ}dti|||dti}|i|iƒ}|i|iƒ}||dti|dtiƒ}ti||ti|ƒ|ddƒ}	ti||ti|ƒ|ddƒ}|ddjoti|dtiƒ}nti|dtiƒ}d||}t#d|ƒ}t$i%i&ƒ}
t(|	ƒ|
_)t(|ƒ|
_*|||
_+|||
_,t$i%i&ƒ}d|_)d|_*|i|_+|i|_,|
i.|ƒ}
|
d
j	oÌ|ddjo:t(t#dti1dti|dtiƒƒƒƒ}n7t(t#dti1dti|dtiƒƒƒƒ}|i|i3|i|
i)|
i*|
i+|
i,|	|||t$i%i4|ƒqˆqˆW|d
j	o|i5ƒn|id	7_t6S(s* Timeout handler to regenerate the frame. if2.0f3.0f0.5if0.25iiÿiN(7RR1t	copy_areaR"R#R'tfloatt	frame_numt	CYCLE_LENtftxmidtymidtmintradiustlenR?tN_IMAGESti_nametindextitmathtpitangRR=tiwR>tihtsinR
tfloortcostxpostypostktmaxRR$t	Rectangletr1tintRNRORPRQtr2t	intersecttdestR2tfabstalphat	compositetINTERP_NEARESTt
queue_drawR3(RRdRZReRfRYR\R_R^RjRsRkRuRoRqRXRaRlR
((RR.~s`

$&,,

		
:6	
(Rt
__module__R2R'R1RR"R#R/RVR
RR*RR.(((RR!s!			cCstƒtiƒdS(N(RRtmain(((RRzÃst__main__(t__doc__R5RbR:RR-RWR6R7tdirnamet__file__R8R9R?RRRzR(R8R-RR?RWR9R:RzR5RbR((Rt?	s				!¢	


Anon7 - 2021