4.11 Effects
procedure
(flomap-shadow fm σ [color]) → flomap
fm : flomap σ : Real color : (Option (U (Vectorof Real) FlVector)) = #f
Returns the alpha (zeroth) component of fm, blurred with standard deviation σ and colorized by color.
Assumes fm and color are alpha-multiplied; see Opacity (Alpha Components).
Examples:
> (flomap->bitmap (flomap-shadow (flomap-inset text-fm 12) 4 #(1/2 1/8 0 1/4)))
> (flomap->bitmap (flomap-cc-superimpose (flomap-shadow (flomap-inset text-fm 12) 4 #(1/2 1/8 0 1/4)) text-fm))
procedure
(flomap-outline fm radius [color]) → flomap
fm : flomap radius : Real color : (Option (U (Vectorof Real) FlVector)) = #f
Returns a flomap that outlines fm with a radius-thick line when fm is superimposed over it.
Assumes fm and color are alpha-multiplied; see Opacity (Alpha Components).
Examples:
> (flomap->bitmap (flomap-outline (flomap-inset text-fm 2) 2 #(1 0 1 1)))
> (flomap->bitmap (flomap-cc-superimpose (flomap-outline (flomap-inset text-fm 2) 2 #(1 0 1 1)) text-fm))
The greatest alpha value in the returned outline is the greatest alpha value in fm.
Because of this, flomap-outline does fine with flomaps with fully opaque regions that are made semi-transparent:
> (define trans-text-fm (fm* 0.5 text-fm))
> (flomap->bitmap trans-text-fm)
> (flomap->bitmap (flomap-cc-superimpose (flomap-outline (flomap-inset trans-text-fm 2) 2 #(1 0 1 1)) trans-text-fm))
However, it does not do so well with flomaps that are partly opaque and partly semi-transparent:
> (define mixed-text-fm (flomap-vc-append text-fm (make-flomap 4 0 10) trans-text-fm))
> (flomap->bitmap (flomap-cc-superimpose (flomap-outline (flomap-inset mixed-text-fm 2) 2 #(1 0 1 1)) mixed-text-fm))