overlay/align

Categories: Image procedures , Compound image procedures

Documentation

;;; (overlay/align halignment valignment i1 i2 ... in [description]) -> image?
;;;   halignment : horizontal-alignment?
;;;   valignment : vertical-alignment?
;;;   i1 : image?
;;;   i2 : image?
;;;   ...
;;;   in : image?
;;; Overlay the two images, aligning them as described.
;;;
;;; halignment is either "left", "center", or "right".
;;; valignment is either "top", "center", or "bottom".

Examples

> (overlay/align "left" "top" (solid-circle 20 "red") (solid-square 40 "blue"))
overlaid images, aligned left-top (a solid red circle with diameter 20 over a solid blue square with side length 40)
> (overlay/align "center" "top" (solid-circle 20 "red") (solid-square 40 "blue"))
overlaid images, aligned center-top (a solid red circle with diameter 20 over a solid blue square with side length 40)
> (overlay/align "right" "top" (solid-circle 20 "red") (solid-square 40 "blue"))
overlaid images, aligned right-top (a solid red circle with diameter 20 over a solid blue square with side length 40)
> (overlay/align "left" "center" (solid-circle 20 "red") (solid-square 40 "blue"))
overlaid images, aligned left-center (a solid red circle with diameter 20 over a solid blue square with side length 40)
> (overlay/align "center" "center" (solid-circle 20 "red") (solid-square 40 "blue"))
overlaid images, aligned center-center (a solid red circle with diameter 20 over a solid blue square with side length 40)
> (overlay/align "right" "center" (solid-circle 20 "red") (solid-square 40 "blue"))
overlaid images, aligned right-center (a solid red circle with diameter 20 over a solid blue square with side length 40)
> (overlay/align "left" "bottom" (solid-circle 20 "red") (solid-square 40 "blue"))
overlaid images, aligned left-bottom (a solid red circle with diameter 20 over a solid blue square with side length 40)
> (overlay/align "center" "bottom" (solid-circle 20 "red") (solid-square 40 "blue"))
overlaid images, aligned center-bottom (a solid red circle with diameter 20 over a solid blue square with side length 40)
> (overlay/align "right" "bottom" (solid-circle 20 "red") (solid-square 40 "blue"))
overlaid images, aligned right-bottom (a solid red circle with diameter 20 over a solid blue square with side length 40)

Tests

Forthcoming

See also

overlay, overlay/origin

Questions

Forthcoming