Linux server.flyproject.com.br 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64
Apache
: 207.244.227.86 | : 216.73.217.1
10 Domain
7.1.33
hubnog
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
lib64 /
pygtk /
2.0 /
demos /
[ HOME SHELL ]
Name
Size
Permission
Action
images
[ DIR ]
drwxr-xr-x
__init__.py
627
B
-rw-r--r--
__init__.pyc
718
B
-rw-r--r--
__init__.pyo
718
B
-rw-r--r--
appwindow.py
11.33
KB
-rw-r--r--
appwindow.pyc
9.27
KB
-rw-r--r--
appwindow.pyo
9.27
KB
-rw-r--r--
buttonbox.py
2.48
KB
-rw-r--r--
buttonbox.pyc
2.81
KB
-rw-r--r--
buttonbox.pyo
2.81
KB
-rw-r--r--
changedisplay.py
13.61
KB
-rw-r--r--
changedisplay.pyc
14.62
KB
-rw-r--r--
changedisplay.pyo
14.62
KB
-rw-r--r--
colorsel.py
2.01
KB
-rw-r--r--
colorsel.pyc
2.67
KB
-rw-r--r--
colorsel.pyo
2.67
KB
-rw-r--r--
dialogs.py
4.01
KB
-rw-r--r--
dialogs.pyc
4.1
KB
-rw-r--r--
dialogs.pyo
4.1
KB
-rw-r--r--
dnd.py
7.11
KB
-rw-r--r--
dnd.pyc
7.65
KB
-rw-r--r--
dnd.pyo
7.65
KB
-rw-r--r--
dndpixmap.py
13.44
KB
-rw-r--r--
dndpixmap.pyc
7.25
KB
-rw-r--r--
dndpixmap.pyo
7.25
KB
-rw-r--r--
editable_cells.py
4.61
KB
-rw-r--r--
editable_cells.pyc
4.89
KB
-rw-r--r--
editable_cells.pyo
4.89
KB
-rw-r--r--
entry_completion.py
2.06
KB
-rw-r--r--
entry_completion.pyc
2.6
KB
-rw-r--r--
entry_completion.pyo
2.6
KB
-rw-r--r--
expander.py
1.32
KB
-rw-r--r--
expander.pyc
1.97
KB
-rw-r--r--
expander.pyo
1.97
KB
-rw-r--r--
hypertext.py
6.78
KB
-rw-r--r--
hypertext.pyc
6.84
KB
-rw-r--r--
hypertext.pyo
6.84
KB
-rw-r--r--
images.py
9.81
KB
-rw-r--r--
images.pyc
7.71
KB
-rw-r--r--
images.pyo
7.71
KB
-rw-r--r--
infobar.py
2.94
KB
-rw-r--r--
infobar.pyc
3.14
KB
-rw-r--r--
infobar.pyo
3.14
KB
-rw-r--r--
list_store.py
4.68
KB
-rw-r--r--
list_store.pyc
4.81
KB
-rw-r--r--
list_store.pyo
4.81
KB
-rw-r--r--
menu.py
2.32
KB
-rw-r--r--
menu.pyc
2.94
KB
-rw-r--r--
menu.pyo
2.94
KB
-rw-r--r--
panes.py
3.78
KB
-rw-r--r--
panes.pyc
3.93
KB
-rw-r--r--
panes.pyo
3.93
KB
-rw-r--r--
pixbufs.py
6.29
KB
-rw-r--r--
pixbufs.pyc
5.93
KB
-rw-r--r--
pixbufs.pyo
5.93
KB
-rw-r--r--
print_editor.py
13.63
KB
-rw-r--r--
print_editor.pyc
13.03
KB
-rw-r--r--
print_editor.pyo
12.96
KB
-rw-r--r--
sizegroup.py
3.72
KB
-rw-r--r--
sizegroup.pyc
4.31
KB
-rw-r--r--
sizegroup.pyo
4.31
KB
-rw-r--r--
statusicon.py
814
B
-rw-r--r--
statusicon.pyc
1.3
KB
-rw-r--r--
statusicon.pyo
1.3
KB
-rw-r--r--
stock_browser.py
8.48
KB
-rw-r--r--
stock_browser.pyc
8.47
KB
-rw-r--r--
stock_browser.pyo
8.47
KB
-rw-r--r--
textscroll.py
4.45
KB
-rw-r--r--
textscroll.pyc
3.61
KB
-rw-r--r--
textscroll.pyo
3.61
KB
-rw-r--r--
textview.py
20.39
KB
-rw-r--r--
textview.pyc
13.96
KB
-rw-r--r--
textview.pyo
13.96
KB
-rw-r--r--
tooltip.py
9.17
KB
-rw-r--r--
tooltip.pyc
8.47
KB
-rw-r--r--
tooltip.pyo
8.47
KB
-rw-r--r--
tree_store.py
10.81
KB
-rw-r--r--
tree_store.pyc
7.63
KB
-rw-r--r--
tree_store.pyo
7.63
KB
-rw-r--r--
treemodel.py
4.27
KB
-rw-r--r--
treemodel.pyc
5.82
KB
-rw-r--r--
treemodel.pyo
5.75
KB
-rw-r--r--
ui_manager.py
6.5
KB
-rw-r--r--
ui_manager.pyc
5.47
KB
-rw-r--r--
ui_manager.pyo
5.47
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : pixbufs.py
#!/usr/bin/env python '''Pixbufs 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.''' # pygtk version: Maik Hertha <maik.hertha@berlin.de> import os import math import pygtk pygtk.require('2.0') import gobject import gtk FRAME_DELAY = 50 CYCLE_LEN = 60 IMAGE_DIR = os.path.join(os.path.dirname(__file__), 'images') BACKGROUND_NAME = "background.jpg" image_names = [ "apple-red.png", "gnome-applets.png", "gnome-calendar.png", "gnome-foot.png", "gnome-gmush.png", "gnome-gimp.png", "gnome-gsame.png", "gnu-keys.png" ] class PixbufsDemo(gtk.Window): frame = None # frame of the background image background = None # background-pixbuf images = [] # list of pixbufs back_width = 0 # width of background image back_height = 0 # height of background image timeout_id = 0 # timeout id frame_num = 0 # number of the current frame timeout_id = None def __init__(self, parent=None): gtk.Window.__init__(self) try: self.set_screen(parent.get_screen()) except AttributeError: self.connect("destroy", lambda *w: gtk.main_quit()) self.connect("destroy", self.cleanup_callback) self.set_title(self.__class__.__name__) self.set_resizable(False) if not self.load_pixbufs(): dialog = gtk.MessageDialog(self, gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_ERROR, gtk.BUTTONS_CLOSE, "Failed to load an image") dialog.connect("response", lambda d, r: d.destroy()) dialog.show() else: self.set_size_request(self.back_width, self.back_height) self.frame = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, False, 8, self.back_width, self.back_height) da = gtk.DrawingArea() da.connect("expose_event", self.expose_cb) self.add(da) self.timeout_id = gobject.timeout_add(FRAME_DELAY, self.timeout) self.show_all() def load_pixbufs(self): ''' Loads the images for the demo and returns whether the operation succeeded. ''' if self.background is not None: return True # already loaded earlier # look in the the current directory where the file is installed try: self.background = gtk.gdk.pixbuf_new_from_file( os.path.join(IMAGE_DIR, BACKGROUND_NAME)) except gobject.GError, error: return False self.back_width = self.background.get_width() self.back_height = self.background.get_height() for filename in image_names: try: self.images.append(gtk.gdk.pixbuf_new_from_file( os.path.join(IMAGE_DIR, filename))) except gobject.GError, error: return False return True def expose_cb(self, draw_area, event): ''' Expose callback for the drawing area. ''' rowstride = self.frame.get_rowstride() # FIXME: what should be the result, string guchar an integer result? #pixels = frame.get_pixels() + rowstride * event.area.y + event.area.x * 3 #pixels = frame.get_pixels()[len(frame.get_pixels()) + rowstride * event.area.y + event.area.x * 3] pixels = self.frame.get_pixels() draw_area.window.draw_rgb_image( draw_area.style.black_gc, event.area.x, event.area.y, event.area.width, event.area.height, 'normal', pixels, rowstride, event.area.x, event.area.y) return True def cleanup_callback(self, win): if self.timeout_id is not None: gobject.source_remove(self.timeout_id) self.timeout_id = None def timeout(self): ''' Timeout handler to regenerate the frame. ''' self.background.copy_area(0, 0, self.back_width, self.back_height, self.frame, 0, 0) f = float(self.frame_num % CYCLE_LEN) / float(CYCLE_LEN) xmid = self.back_width / 2.0 ymid = self.back_height / 2.0 radius = min(xmid, ymid) / 2.0 N_IMAGES = len(image_names) for i_name in image_names: i = image_names.index(i_name) ang = 2.0 * math.pi * i / N_IMAGES - f * 2.0 * math.pi iw = self.images[i].get_width() ih = self.images[i].get_height() r = radius +(radius / 3.0) * math.sin(f * 2.0 * math.pi) xpos = math.floor(xmid + r * math.cos(ang) - iw / 2.0 + 0.5) ypos = math.floor(ymid + r * math.sin(ang) - ih / 2.0 + 0.5) if i % 2 == 0: k = math.cos(f * 2.0 * math.pi) else: k = math.sin(f * 2.0 * math.pi) k = 2.0 * k * k k = max(0.25, k) # satisfy the c-source r1 = gtk.gdk.Rectangle() r1.x = int(xpos) r1.y = int(ypos) r1.width = iw * k r1.height = ih * k r2 = gtk.gdk.Rectangle() r2.x = 0 r2.y = 0 r2.width = self.back_width r2.height = self.back_height dest = r1.intersect(r2) if dest is not None: if i % 2 == 0: alpha = int( max(127, math.fabs(255 * math.cos(f * 2.0 * math.pi)))) else: alpha = int( max(127, math.fabs(255 * math.sin(f * 2.0 * math.pi)))) self.images[i].composite( self.frame, dest.x, dest.y, dest.width, dest.height, xpos, ypos, k, k, gtk.gdk.INTERP_NEAREST, alpha) if self is not None: self.queue_draw() self.frame_num += 1 return True def main(): PixbufsDemo() gtk.main() if __name__ == '__main__': main()
Close