source: trunk/third/rep-gtk/examples/canvas-pixbuf-test @ 18404

Revision 18404, 792 bytes checked in by ghudson, 22 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r18403, which included commits to RCS files with non-trunk default branches.
  • Property svn:executable set to *
Line 
1#!/bin/sh
2exec rep "$0" "$@"
3!#
4
5(require 'gui.gtk-2.gtk)
6(require 'gui.gtk-2.gnome-canvas)
7(require 'gui.gtk-2.gdk-pixbuf)
8
9(define window (gtk-window-new 'toplevel))
10(define canvas (gnome-canvas-new))
11(define pixbuf (gdk-pixbuf-new-from-file
12                (or (car command-line-args)
13                    "/usr/share/pixmaps/gnome-logo-icon-transparent.png")))
14
15(gtk-widget-set-usize canvas 400 400)
16(gnome-canvas-set-scroll-region canvas 0 0 400 400)
17
18(gnome-canvas-item-new (gnome-canvas-root canvas)
19                       'GnomeCanvasPixbuf
20                       (list 'pixbuf (gdk-pixbuf-scale-simple
21                                      pixbuf 300 300 'bilinear)
22                             'x 10 'y 10))
23
24(gtk-container-add window canvas)
25(gtk-widget-show-all window)
26
27(g-signal-connect window "delete_event" (lambda () (throw 'quit 0)))
28
29(setq interrupt-mode 'exit)
30(recursive-edit)
Note: See TracBrowser for help on using the repository browser.