File: bitmap.rkt

package info (click to toggle)
racket 8.16%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 167,812 kB
  • sloc: ansic: 306,492; lisp: 211,972; pascal: 79,874; sh: 20,446; asm: 15,252; makefile: 1,738; cpp: 1,715; javascript: 1,340; exp: 789; python: 452; csh: 369; perl: 275; xml: 106
file content (73 lines) | stat: -rw-r--r-- 2,355 bytes parent folder | download | duplicates (4)
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
72
73
#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
    [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)
           #:aspect-ratio (or/c (and/c rational? positive?) #f)
           #:legend-anchor anchor/c
           #:out-file (or/c path? string? output-port? #f)
           #:out-kind symbol?]
          (is-a?/c bitmap%))]
    [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)
           #:aspect-ratio (or/c (and/c rational? positive?) #f)
           #:legend-anchor anchor/c
           #:out-file (or/c path? string? output-port? #f)
           #:out-kind symbol?]
          (is-a?/c bitmap%))])))


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

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

(provide plot plot3d)