3 Pict Utilities
NOTE: This library is deprecated; use pict, instead. The contents of this module, with the exceptions below, have been merged with the pict collection, or its subcollections.
(require unstable/gui/pict) | package: unstable-lib |
The functions and macros exported by this module are also exported by unstable/gui/slideshow.
3.1 Pict Colors
Example: | ||
|
3.2 Pict Manipulation
Example: | ||
|
procedure
pict : pict? width : real? height : real? mode : (or/c 'preserve 'inset 'distort) = 'preserve
Examples: | ||||||
|
3.2.1 Conditional Manipulations
These pict transformers all take boolean arguments that determine whether to transform the pict or leave it unchanged. These transformations can be useful for staged slides, as the resulting pict always has the same size and shape, and its contents always appear at the same position, but changing the boolean argument between slides can control when the transformation occurs.
Example: | ||
|
Example: | ||
|
3.2.2 Conditional Combinations
These bindings provide additional control over the combinations in pict/conditional.
syntax
syntax
(with-pict-combine combine-id body ...)
Example: | ||||||||||||
|
syntax
(pict-match test-expr maybe-combine [pattern pict-expr] ...)
maybe-combine =
| #:combine combine-expr
3.3 Shapes with Borders
The subsequent bindings were added by Vincent St-Amour.
procedure
(ellipse/border w h [ #:color color #:border-color border-color #:border-width border-width]) → pict? w : real? h : real? color : color/c = "white" border-color : color/c = "black" border-width : real? = 2
procedure
(circle/border diameter [ #:color color #:border-color border-color #:border-width border-width]) → pict? diameter : real? color : color/c = "white" border-color : color/c = "black" border-width : real? = 2
procedure
(rectangle/border w h [ #:color color #:border-color border-color #:border-width border-width]) → pict? w : real? h : real? color : color/c = "white" border-color : color/c = "black" border-width : real? = 2
procedure
(rounded-rectangle/border w h [ #:color color #:border-color border-color #:border-width border-width #:corner-radius corner-radius #:angle angle]) → pict? w : real? h : real? color : color/c = "white" border-color : color/c = "black" border-width : real? = 2 corner-radius : real? = -0.25 angle : real? = 0
Examples: | ||||||||
|
3.4 Lines with Labels
The subsequent bindings were added by Scott Owens.
procedure
(pin-label-line label pict src-pict src-coord-fn dest-pict dest-coord-fn [ #:start-angle start-angle #:end-angle end-angle #:start-pull start-pull #:end-pull end-pull #:line-width line-width #:color color #:alpha alpha #:style style #:under? under? #:x-adjust x-adjust #:y-adjust y-adjust]) → pict? label : pict? pict : pict? src-pict : pict-path? src-coord-fn : (-> pict-path? (values real? real?)) dest-pict : pict-path? dest-coord-fn : (-> pict-path? (values real? real?)) start-angle : (or/c real? #f) = #f end-angle : (or/c real? #f) = #f start-pull : real? = 1/4 end-pull : real? = 1/4 line-width : (or/c real? #f) = #f color : (or/c #f string? (is-a?/c color%)) = #f alpha : (real-in 0 1) = 1 style : pen-style/c = 'solid under? : any/c = #f x-adjust : real? = 0 y-adjust : real? = 0
procedure
(pin-arrow-label-line label arrow-size pict src-pict src-coord-fn dest-pict dest-coord-fn [ #:start-angle start-angle #:end-angle end-angle #:start-pull start-pull #:end-pull end-pull #:line-width line-width #:color color #:alpha alpha #:style style #:solid? solid? #:under? under? #:hide-arrowhead? hide-arrowhead? #:x-adjust x-adjust #:y-adjust y-adjust]) → pict? label : pict? arrow-size : real? pict : pict? src-pict : pict-path? src-coord-fn : (-> pict-path? (values real? real?)) dest-pict : pict-path? dest-coord-fn : (-> pict-path? (values real? real?)) start-angle : (or/c real? #f) = #f end-angle : (or/c real? #f) = #f start-pull : real? = 1/4 end-pull : real? = 1/4 line-width : (or/c real? #f) = #f color : (or/c #f string? (is-a?/c color%)) = #f alpha : (real-in 0 1) = 1 style : pen-style/c = 'solid solid? : boolean? = #t under? : any/c = #f hide-arrowhead? : any/c = #f x-adjust : real? = 0 y-adjust : real? = 0
procedure
(pin-arrows-label-line label arrow-size pict src-pict src-coord-fn dest-pict dest-coord-fn [ #:start-angle start-angle #:end-angle end-angle #:start-pull start-pull #:end-pull end-pull #:line-width line-width #:color color #:alpha alpha #:style style #:solid? solid? #:under? under? #:hide-arrowhead? hide-arrowhead? #:x-adjust x-adjust #:y-adjust y-adjust]) → pict? label : pict? arrow-size : real? pict : pict? src-pict : pict-path? src-coord-fn : (-> pict-path? (values real? real?)) dest-pict : pict-path? dest-coord-fn : (-> pict-path? (values real? real?)) start-angle : (or/c real? #f) = #f end-angle : (or/c real? #f) = #f start-pull : real? = 1/4 end-pull : real? = 1/4 line-width : (or/c real? #f) = #f color : (or/c #f string? (is-a?/c color%)) = #f alpha : (real-in 0 1) = 1 style : pen-style/c = 'solid solid? : boolean? = #t under? : any/c = #f hide-arrowhead? : any/c = #f x-adjust : real? = 0 y-adjust : real? = 0
Example: | ||||||||||
|
3.5 Blur
The subsequent bindings were added by Ryan Culpepper.
procedure
(blur-bitmap! bitmap h-radius [v-radius]) → void?
bitmap : (is-a?/c bitmap%) h-radius : (and/c real? (not/c negative?)) v-radius : (and/c real? (not/c negative?)) = h-radius
3.6 Shadow Frames
procedure
(arch outer-width inner-width solid-height leg-height) → pict? outer-width : real? inner-width : real? solid-height : real? leg-height : real?
Example: | ||
|
3.7 Drawing
The subsequent bindings were added by Jay McCarthy.
3.8 Additional combinators
The subsequent bindings were added by Asumu Takikawa.
Examples: | ||||
|
procedure
(cross-out pict [ #:width width #:style style #:color color]) → pict? pict : pict? width : real? = 1
style :
(or/c 'transparent 'solid 'xor 'hilite 'dot 'long-dash 'short-dash 'dot-dash 'xor-dot 'xor-long-dash 'xor-short-dash 'xor-dot-dash) = 'solid color : color/c = "black"
Examples: | ||||||
|
3.9 PLT Logos
(require unstable/gui/pict/plt-logo) | |
package: unstable-lib |
The subsequent bindings were added by Jay McCarthy.
procedure
(make-plt-title-background w h) → pict?
w : real? h : real?