#lang scheme/gui

(define ventana
  (make-object frame% 
    "Coordenadas en x = 400 y = 300" 
    #f 
    450 350 
    400 300))

(define lienzo
  (instantiate canvas% 
    (ventana) 
    (style '(border)) ))

(define dc (send lienzo get-dc))
;;;;;;;;;;;
(define brocha-roja
  (make-object brush%
    "red"
    'solid))

(define lapiz-azul
  (make-object pen%
    "blue"
    5
    'solid))
;;;;;;;;;;;
(send dc set-pen lapiz-azul)

(define ventana2
  (make-object frame% 
    "Coordenadas en x = 100, y = 100" 
    #f 
    450 350 
    100 100))

(define lienzo1
  (instantiate canvas% 
    (ventana2) 
    (style '(border)) ))

(define dc1 (send lienzo1 get-dc))

(define lienzo2
  (instantiate canvas% 
    (ventana2) 
    (style '(border)) ))

(define dc2 (send lienzo2 get-dc))

(send ventana2 show #t)

(sleep/yield 1)

(send dc1 set-brush brocha-roja)
(send dc1 draw-rectangle 10 10 100 100)

(sleep/yield 1)

(send dc2 set-pen lapiz-azul)
(send dc2 draw-line 0 10 280 10)
