File: parameter-groups.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 (123 lines) | stat: -rw-r--r-- 3,506 bytes parent folder | download
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
#lang racket/base

(module untyped-defs racket/base
  (require "parameters.rkt"
           "parameter-group.rkt")
  
  (provide (all-defined-out))
  
  (define-parameter-group plot-axes?
    (plot-x-axis? plot-x-far-axis?
                  plot-y-axis? plot-y-far-axis?
                  plot-z-axis? plot-z-far-axis?))
  
  (define-parameter-group plot-tick-labels
    (plot-x-tick-labels?
     plot-x-tick-label-anchor
     plot-x-tick-label-angle
     plot-x-far-tick-labels?
     plot-x-far-tick-label-anchor
     plot-x-far-tick-label-angle
     plot-y-tick-labels?
     plot-y-tick-label-anchor
     plot-y-tick-label-angle
     plot-y-far-tick-labels?
     plot-y-far-tick-label-anchor
     plot-y-far-tick-label-angle))
  
  (define-parameter-group plot-appearance
    (plot-width
     plot-height
     plot-foreground plot-foreground-alpha
     plot-background plot-background-alpha
     plot-line-width plot-tick-size
     plot-font-size plot-font-face plot-font-family
     plot-legend-anchor plot-legend-box-alpha
     plot-axes? plot-tick-labels
     plot-decorations?
     plot-animating?))
  
  (define-parameter-group plot3d-appearance
    (plot3d-samples
     plot3d-angle
     plot3d-altitude
     plot3d-ambient-light
     plot3d-diffuse-light?
     plot3d-specular-light?))
  
  (define-parameter-group plot-output
    (plot-new-window? plot-jpeg-quality plot-ps/pdf-interactive? plot-ps-setup))
  
  (define-parameter-group plot-labels
    (plot-title
     plot-x-label plot-y-label plot-z-label
     plot-x-far-label plot-y-far-label plot-z-far-label))
  
  (define-parameter-group plot-x-axis (plot-x-transform plot-x-ticks plot-x-far-ticks))
  (define-parameter-group plot-y-axis (plot-y-transform plot-y-ticks plot-y-far-ticks))
  (define-parameter-group plot-z-axis (plot-z-transform plot-z-ticks plot-z-far-ticks))
  (define-parameter-group plot-axes (plot-x-axis plot-y-axis plot-z-axis plot-d-ticks plot-r-ticks))
  
  (define-parameter-group plot-parameters
    (plot-appearance
     plot3d-appearance
     plot-labels
     plot-output
     plot-axes))
  )

(module typed-defs typed/racket/base
  (require typed/racket/draw
           (submod ".." untyped-defs)
           "type-doc.rkt"
           "types.rkt"
           "axis-transform.rkt"
           "ticks.rkt")
  
  (provide Plot-Parameters)
  
  (deftype Plot-Parameters
    (List
     (List
      Positive-Integer
      Positive-Integer
      Plot-Color
      Nonnegative-Real
      Plot-Color
      Nonnegative-Real
      Nonnegative-Real
      Nonnegative-Real
      Nonnegative-Real
      (U False String)
      Font-Family
      Anchor
      Nonnegative-Real
      (List Boolean Boolean Boolean Boolean Boolean Boolean)
      (List Boolean Anchor Real (U Boolean 'auto) Anchor Real Boolean Anchor Real (U Boolean 'auto) Anchor Real)
      Boolean
      Boolean)
     (List Positive-Integer Real Real Nonnegative-Real Boolean Boolean)
     (List
      (U False String)
      (U False String)
      (U False String)
      (U False String)
      (U False String)
      (U False String)
      (U False String))
     (List Boolean Nonnegative-Integer Boolean (Instance PS-Setup%))
     (List
      (List Axis-Transform ticks ticks)
      (List Axis-Transform ticks ticks)
      (List Axis-Transform ticks ticks)
      ticks
      ticks)))
  
  (define (test) (ann (plot-parameters) Plot-Parameters)))

(require 'untyped-defs
         'typed-defs)

(provide (all-from-out
          'untyped-defs
          'typed-defs))