File: bitmap.rkt

package info (click to toggle)
racket 7.2%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 125,432 kB
  • sloc: ansic: 258,980; pascal: 59,975; sh: 33,650; asm: 13,558; lisp: 7,124; makefile: 3,329; cpp: 2,889; exp: 499; python: 274; xml: 11
file content (71 lines) | stat: -rw-r--r-- 2,199 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#lang racket/base

(require typed/untyped-utils
         "no-gui.rkt"
         "private/no-gui/plot-bitmap.rkt")
(provide (all-from-out "no-gui.rkt"))

(module untyped racket/base
  (require "private/no-gui/plot-bitmap.rkt" racket/contract
           
           racket/class
           racket/draw
           pict
           "utils.rkt"
           "private/common/contract.rkt"
           "private/common/nonrenderer.rkt"
           "private/plot2d/renderer.rkt")
  (provide
   (contract-out
    [untyped-plot
     (->* [(treeof (or/c renderer2d? nonrenderer?))]
          [#:x-min (or/c real? #f)
           #:x-max (or/c real? #f)
           #:y-min (or/c real? #f)
           #:y-max (or/c real? #f)
           #:width (and/c exact-integer? (>/c 0))
           #:height (and/c exact-integer? (>/c 0))
           #:title (or/c string? #f)
           #:x-label (or/c string? #f)
           #:y-label (or/c string? #f)
           #:legend-anchor anchor/c
           #:out-file (or/c path? string? output-port? #f)
           #:out-kind symbol?]
          (is-a?/c bitmap%))]
    [untyped-plot3d
     (->* [(treeof (or/c renderer3d? nonrenderer?))]
          [#:x-min (or/c real? #f)
           #:x-max (or/c real? #f)
           #:y-min (or/c real? #f)
           #:y-max (or/c real? #f)
           #:z-min (or/c real? #f)
           #:z-max (or/c real? #f)
           #:width (and/c exact-integer? (>/c 0))
           #:height (and/c exact-integer? (>/c 0))
           #:angle real? #:altitude real?
           #:title (or/c string? #f)
           #:x-label (or/c string? #f)
           #:y-label (or/c string? #f)
           #:z-label (or/c string? #f)
           #:legend-anchor anchor/c
           #:out-file (or/c path? string? output-port? #f)
           #:out-kind symbol?]
          (is-a?/c bitmap%))]))
   (define untyped-plot3d plot3d)
   (define untyped-plot plot))


(require (rename-in "private/no-gui/plot-bitmap.rkt"
                    [plot typed-plot]
                    [plot3d typed-plot3d])
         'untyped)

(define-typed/untyped-identifier plot
  typed-plot
  untyped-plot)
(define-typed/untyped-identifier plot3d
  typed-plot3d
  untyped-plot3d)

(provide plot plot3d)