GTP pict
1 GTP pict functions
procedure
procedure
(tau-icon [ #:color color #:height height #:material material]) → (is-a?/c bitmap%) color : pict-color/c = (*tau-color*) height : real? = (default-icon-height) material : icon-material? = (default-icon-material)
procedure
(icon-material? x) → boolean?
x : any/c
procedure
procedure
procedure
(make-program-pict/mixed #:show-boundary? show-boundary?)
→ pict? show-boundary? : #false
procedure
(make-component-pict/sta [ #:body body #:width width #:height height]) → pict? body : (or/c #f pict?) = #f width : (or/c #f real?) = #f height : (or/c #f real?) = #f
procedure
(make-component-pict/dyn [ #:body body #:width width #:height height]) → pict? body : (or/c #f pict?) = #f width : (or/c #f real?) = #f height : (or/c #f real?) = #f
procedure
(make-component-pict/blank [ #:body body #:width width #:height height]) → pict? body : (or/c #f pict?) = #f width : (or/c #f real?) = #f height : (or/c #f real?) = #f
procedure
(make-component-pict/tu #:body body #:width width #:height height #:color color) → pict? body : pict? width : real? height : real? color : pict-color/c
procedure
(make-component-pict [ #:body body #:width width #:height height #:color color #:border-width border-width #:border-color border-color #:radius radius #:x-margin x-margin #:y-margin y-margin]) → pict? body : pict? = (blank) width : (or/c #f real?) = #f height : (or/c #f real?) = #f color : (or/c #f real?) = #f border-width : real? = 4 border-color : pict-color/c = #f radius : real? = -0.08 x-margin : real? = 10 y-margin : real? = 10
> (make-program-pict/sta) > (make-program-pict/dyn) > (make-program-pict/mixed #:show-boundary? #true)
procedure
(make-boundary-pict #:l l-pict #:c c-pict #:r r-pict #:x-margin x-margin) → pict? l-pict : (or/c pict? #f) c-pict : (or/c pict? #f) r-pict : (or/c pict? #f) x-margin : real?
> (make-boundary-pict #:l (text "\"hello\"" (cons (*stat-color*) '()) 20) #:c (text "v" '() 20) #:r (text "Int" '() 20))
procedure
(bool*->bitstring b*) → string?
b* : (listof boolean?)
> (bool*->bitstring '(#t #t)) "11"
> (bool*->bitstring '(#f #t #f #f)) "0100"
procedure
(bool*->tag b*) → symbol?
b* : (listof boolean?)
> (bool*->tag '(#t #f #t #t)) 'cfg-1011
procedure
(bitstring->tag s) → symbol?
s : string?
> (bitstring->tag "101") 'cfg-101
procedure
(make-lattice total-bits make-node #:x-margin x-margin #:y-margin y-margin) → pict? total-bits : natural? make-node : (-> (listof boolean?) pict?) x-margin : (*lattice-node-x-margin*) y-margin : (*lattice-node-y-margin*)
> (scale-to-fit (make-lattice 3 make-node) 200 600)
procedure
(make-fraction top bot) → pict?
top : pict? bot : pict?
> (make-fraction (standard-fish 50 30) (jack-o-lantern 40))
procedure
procedure
i : (-> #:material icon-material? #:height real? (is-a?/c bitmap%)) h : real?
procedure
procedure
(small-x-icon) → pict?
procedure
(small-tau-icon) → pict?
procedure
> (small-check-icon) > (small-x-icon) > (small-tau-icon) > (small-lambda-icon)
procedure
(make-2table picts [ #:col-sep col-sep #:row-sep row-sep] #:col-align col-align #:row-align row-align) → pict? picts : (listof (cons/c pict? pict?)) col-sep : (or/c real? #f) = 328/5 row-sep : (or/c real? #f) = 364/5 col-align : lc-superimpose row-align : cc-superimpose
> (make-2table (list (cons (standard-fish 40 40) (small-check-icon)) (cons (jack-o-lantern 40) (small-x-icon))) #:row-sep 30)
2 Deep, Shallow, Erasure
“Deep” “Shallow” and “Erasure” are three possible names for three common approaches to enforcing types at runtime in a mixed-typed (or, gradually typed) language.
value
value
SHALLOW-TAG : symbol? = 'shallow
value
ERASURE-TAG : symbol? = 'erasure
value
= (list DEEP-TAG SHALLOW-TAG ERASURE-TAG)
procedure
x : any/c
procedure
(dse->string x) → string?
x : dse-tag?
procedure
(dse->letter x) → string?
x : dse-tag?
procedure
(dse->apples-name x) → string?
x : dse-tag?
procedure
(dse->kafka-name x) → string?
x : dse-tag?
procedure
(dse->color% x) → (is-a?/c color%)
x : dse-tag?
3 GTP pict parameters
4 GTP pict constants
value
TYPE-BOUNDARY-TAG : symbol? = 'type-boundary
value
value
SLIDE-LEFT : real% = 1/50
value
SLIDE-BOTTOM : real% = 4/5
value
SLIDE-RIGHT : real% = 49/50
value
value
value