Permalink
Browse files

lagt till en testbild. Skapat m�jlighet att l�gga in bilder i canvas.

  • Loading branch information...
1 parent dae00fe commit badd35a92a3331cd28f599a7530dc365ac1b85fb Benjamin Lind committed Apr 18, 2012
Showing with 18 additions and 0 deletions.
  1. +18 −0 canvas.rkt
  2. BIN testbild.jpg
View
18 canvas.rkt
@@ -0,0 +1,18 @@
+
+
+
+
+(define *frame* (make-object frame% "Spelplan"))
+
+(define *canvas* (new canvas% [parent *frame*] ;;en canvas
+ [label "tjenare"]))
+
+;; A procedures that draws a picture from file
+(define (draw-pic file x y)
+ (send (send *canvas* get-dc) draw-bitmap (make-object bitmap% file 'unknown #f) x y))
+
+(send *frame* show #t)
+
+;; skriv detta för att lägga in en bild på koordinater
+;;(define (draw-pic file x y)
+;;(send (send *canvas* get-dc) draw-bitmap (make-object bitmap% file 'unknown #f) x y))
View
BIN testbild.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit badd35a

Please sign in to comment.