racket/collects/tests/file/xpm-show.rkt
2010-06-22 11:33:06 -06:00

18 lines
403 B
Racket

#lang racket/gui
(require file/xpm)
(define the-bitmap
(command-line #:program "xpm-show"
#:args (file)
(xpm->bitmap% (with-input-from-file file xpm-read))))
(define frame (new frame% [label "XPM"]))
(define canvas
(new canvas%
[parent frame]
[paint-callback
(λ (c dc)
(send dc draw-bitmap the-bitmap 0 0))]))
(send frame show #t)