8.16.0.4
10 Pict Speech Balloons🔗ℹ
|
fun pin( | content :: Pict, | ~on: base :: Pict, | ~at: finder :: Find, | ~find: find_mode :: FindMode = #'always, | ~spike: spike :: CompassDirection, | ~margin: margin :: maybe(Real) = #false, | ~horiz_margin: hmargin :: Real = margin || current_horiz_margin(), | ~vert_margin: vmargin :: Real = margin || current_vert_margin(), | ~corner_radius: corner_radius :: Real = 10, | ~spike_radius: spike_radius :: Real = corner_radius, | ~dx: dx :: Real = spike_to_dx(spike), | ~dy: dy :: Real = spike_to_dy(spike), | ~sprout: sprout :: Real = 0.5, | ~thought: thought = #false, | ~fill: fill :: maybe(ColorMode) = current_color(), | ~line: line :: maybe(ColorMode) = #false, | ~line_width: line_width :: LineWidth = #'inherit, | ~epoch: epoch :: EpochAlignment = #'center, | ~duration: duration :: DurationPinAlignment = #'sustain | ) :: Pict |
|
The
pin function (intended to be used as
balloon.pin) wraps a cartoon speech balloon around
content, extends a pointer from the balloon in the direction
indicated by
spike, and pins the balloon onto
base
so that the point is at the location specified by
finder.
When content is nothing, then base is
returned as-is. When base is nothing, then the
result is nothing.
The sprout argument applies only when spike is
#'n, #'s, #'e, or #'w. In that
case, sprout determines a position along the corresponding
edge of the balloon as a fraction of the edge running left-to-right or
top-to-bottom.
The duration argument is used in a way analogous to
pict.overlay, which can insert a balloon with content
into a part of the timeline of base.
The find_mode argument is used in a way analogous to
pict.pin, where #'maybe mode means that a balloon is
not pinned when finder fails to find a location.
When the resulting pict’s time box is padded (as opposed to
sustained), then content is still pinned onto
on_pict as during the time box, but no balloon is drawn behind
content.
Reports the default spike offset for a given direction. The offset is
relative to the point on the boundary of a balloon where the spike
emerges.
Context parameters for argument defaults in
pin.
Matches a symbol for a compass direction, one of
#'n,
#'ne,
#'e,
#'se,
#'s,
#'sw,
#'w, or
#'nw. The north direction,
#'n, corersponds to a negative y-offset.