5 Bounding Box Adjusters
procedure
pict : pict-convertible? amt : real? (inset pict h-amt v-amt) → pict? pict : pict-convertible? h-amt : real? v-amt : real? (inset pict l-amt t-amt r-amt b-amt) → pict? pict : pict-convertible? l-amt : real? t-amt : real? r-amt : real? b-amt : real?
> (pict-width (disk 40)) 40
> (pict-width (inset (disk 40) -10)) 20
procedure
(clip-descent pict) → pict?
pict : pict-convertible?
procedure
(clip-ascent pict) → pict?
pict : pict-convertible?
> (explain (text "gjy" null 12))
> (explain (clip-ascent (text "gjy" null 12))) inexact->exact: no exact representation
number: +nan.0
procedure
(lift-bottom-relative-to-baseline p baseline [ #:extend-bb? bb?]) → pict? p : pict-convertible? baseline : real? bb? : any/c = #f
> (define shift 10) > (explain (lift-bottom-relative-to-baseline t shift))
> (explain (lift-bottom-relative-to-baseline t shift #:extend-bb? #t))
> (explain (lift-bottom-relative-to-baseline tt shift))
> (explain (lift-bottom-relative-to-baseline tt shift #:extend-bb? #t))
> (explain (lift-bottom-relative-to-baseline t (- shift)))
> (explain (lift-bottom-relative-to-baseline t (- shift) #:extend-bb? #t))
> (explain (lift-bottom-relative-to-baseline tt (- shift)))
> (explain (lift-bottom-relative-to-baseline tt (- shift) #:extend-bb? #t))
Added in version 1.10 of package pict-lib.
procedure
(drop-top-relative-to-ascent p ascent [ #:extend-bb? bb?]) → pict? p : pict-convertible? ascent : real? bb? : any/c = #f
> (define shift 10) > (explain (drop-top-relative-to-ascent t shift))
> (explain (drop-top-relative-to-ascent t shift #:extend-bb? #t))
> (explain (drop-top-relative-to-ascent tt shift))
> (explain (drop-top-relative-to-ascent tt shift #:extend-bb? #t))
> (explain (drop-top-relative-to-ascent t (- shift)))
> (explain (drop-top-relative-to-ascent t (- shift) #:extend-bb? #t))
> (explain (drop-top-relative-to-ascent tt (- shift)))
> (explain (drop-top-relative-to-ascent tt (- shift) #:extend-bb? #t))
Added in version 1.10 of package pict-lib.
procedure
(lift-above-baseline pict amt) → pict?
pict : pict-convertible? amt : real?
Lifts pict relative to its baseline, extending the bounding box height if necessary.
> (explain (hbl-append (text "ijijij" null 12) (text "abc" null 12)))
> (inset (explain (lift-above-baseline (text "ijijij" null 12) 20)) 0 100 0 50)
> (explain (hbl-append (lift-above-baseline (text "ijijij" null 12) 20) (text "abc" null 12)))
procedure
(drop-below-ascent pict amt) → pict?
pict : pict-convertible? amt : real?
Drops pict relative to its ascent line, extending the bounding box height if necessary.
> (define txt (text "ijgy" null 12)) > (explain (hbl-append txt (text "abc" null 12)))
> (explain (drop-below-ascent txt 12))
> (explain (hbl-append (drop-below-ascent txt 12) (text "abc" null 12)))
procedure
pict : pict-convertible?
> (explain (hbl-append (text "gjy" null 12) (text "abc" null 12)))
> (explain (hbl-append (baseless (text "gjy" null 12)) (text "abc" null 12)))
procedure
pict : pict-convertible? sub-pict : pict-convertible?
> (define p1 (filled-rectangle 50 50 #:color "darkkhaki")) > (define p2 (filled-rectangle 30 30 #:color "sienna")) > (define combined (cc-superimpose p1 p2)) > combined
> (refocus combined p2)
procedure
pict : pict-convertible?
> (define p1 (filled-rectangle 50 50 #:color "maroon")) > (define p2 (disk 30 #:color "tomato")) > (define combined (cc-superimpose p1 p2)) > (refocus combined p2)
> (panorama (refocus combined p2))
procedure
pict : pict-convertible? sub-pict : pict-path?
procedure
pict : pict-convertible? sub-pict : pict-convertible?
That is, use-last* is like use-last, but the last
element of sub-pict is used as the new last element for
pict, instead of sub-pict itself—