From c758f65a0bc6232be12ebbd78ead47d8ba5ad78a Mon Sep 17 00:00:00 2001 From: Asumu Takikawa Date: Sat, 31 Mar 2012 01:06:11 -0400 Subject: [PATCH] Uncomment & fix racket/draw contracts Use dummy values (see also racket/snip) to avoid cycles. --- collects/racket/draw/contracts.rkt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/collects/racket/draw/contracts.rkt b/collects/racket/draw/contracts.rkt index 3f2557e3af..9686d84e0c 100644 --- a/collects/racket/draw/contracts.rkt +++ b/collects/racket/draw/contracts.rkt @@ -23,6 +23,9 @@ (provide (all-defined-out)) +;; dummy values to avoid cycles +(define-values (frame% dialog%) (values object% object%)) + (define brush-style/c (one-of/c 'transparent 'solid 'opaque 'xor 'hilite 'panel @@ -116,9 +119,8 @@ [get-char-height (->m (and/c real? (not/c negative?)))] [get-char-width (->m (and/c real? (not/c negative?)))] [get-clipping-region (->m (or/c (is-a?/c region%) #f))] - ;; Missing in this version, but fixed in master - ;[get-device-scale (->m (values (and/c real? (not/c negative?)) - ; (and/c real? (not/c negative?))))] + [get-device-scale (->m (values (and/c real? (not/c negative?)) + (and/c real? (not/c negative?))))] [get-font (->m (is-a?/c font%))] [get-gl-context (->m (or/c (is-a?/c gl-context<%>) #f))] [get-initial-matrix (->m (vector/c real? real? real? @@ -335,8 +337,7 @@ (and/c dc<%>/c (class/c (init [interactive any/c] - ;; this doesn't work due to a cyclic dependency - ;[parent (or/c (is-a?/c frame%) (is-a?/c dialog%) #f)] + [parent (or/c (is-a?/c frame%) (is-a?/c dialog%) #f)] [use-paper-bbox any/c] [as-eps any/c] [width (or/c (and/c real? (not/c negative?)) #f)] @@ -347,8 +348,7 @@ (and/c dc<%>/c (class/c (init [interactive any/c] - ;; see above - ;[parent (or/c (is-a?/c frame%) (is-a?/c dialog%) #f)] + [parent (or/c (is-a?/c frame%) (is-a?/c dialog%) #f)] [use-paper-bbox any/c] [as-eps any/c] [width (or/c (and/c real? (not/c negative?)) #f)]