On this page:
Find
Find
Find.abs
Find.in
Find.center
Find.left
Find.right
Find.top
Find.topline
Find.baseline
Find.bottom
Find.left_  top
Find.left_  topline
Find.left_  center
Find.left_  baseline
Find.left_  bottom
Find.center_  top
Find.center_  topline
Find.center_  center
Find.center_  baseline
Find.center_  bottom
Find.right_  top
Find.right_  topline
Find.right_  center
Find.right_  baseline
Find.right_  bottom
Find.top_  left
Find.top_  center
Find.top_  right
Find.topline_  left
Find.topline_  center
Find.center_  left
Find.center_  right
Find.baseline_  left
Find.baseline_  center
Find.baseline_  right
Find.bottom_  left
Find.bottom_  center
Find.bottom_  right
8.12

5 Pict Finders🔗ℹ

annotation

Find

Satisfied by a finder, which is applied to a pict to obtain two numbers representing an x-offset and y-offset.

function

fun Find(

  pict :: Pict,

  ~horiz: horiz :: HorizAlignment = #'center,

  ~vert: vert :: VertAlignment = #'center,

  ~dx: dx :: Real = 0,

  ~dy: dy :: Real = 0,

  ~dhoriz: dhoriz :: Real = 0,

  ~dvert: dvert :: Real = 0

) :: Find

Creates a finder that locates a pict within another pict. The Find.in method takes the pict that contains pict and returns two numbers, the x-offset and y-offset.

The horiz and vert arguments determine the position within pict that is fount. For example, the combination #'right and #'bottom find the bottom-right corner of pict’s bounding box within another pict.

The dx and dy offsets are added to an x-offset and y-offset that would be returned otherwise.

The dhoriz and dvert arguments are multipled by the height and width, respectively, of the pict as located within another pict (which can be different than pict’s immediate dimensions due to scaling). The multipled values are then added to an x-offset and y-offset that would be returned otherwise, in addition to dx and dy.

function

fun Find.abs(~dx: dx :: Real = 0, -dy: dy :: Real = 0) :: Find

Creates a finder that always returns dx and dy without needing to locate any particular component pict.

method

method (finder :: Find).in(pict :: Pict) :: values(Real, Real)

Applies finder to pict. An exception is thrown is a needed component pict cannot be found in pict.

If pict is an animated picture, then the search corresponds to finding within Pict.snapshot(pict). When a finder for an animated pict is provdied to a function like pin, however, pin will produce an animated pict where the finder is used separately for each snapshot generated from the combined animated pict.

function

fun Find.center(pict :: Pict, ....) :: Find

 

function

fun Find.left(pict :: Pict, ....) :: Find

 

function

fun Find.right(pict :: Pict, ....) :: Find

 

function

fun Find.top(pict :: Pict, ....) :: Find

 

function

fun Find.topline(pict :: Pict, ....) :: Find

 

function

fun Find.baseline(pict :: Pict, ....) :: Find

 

function

fun Find.bottom(pict :: Pict, ....) :: Find

 

function

fun Find.left_top(pict :: Pict, ....) :: Find

 

function

fun Find.left_topline(pict :: Pict, ....) :: Find

 

function

fun Find.left_center(pict :: Pict, ....) :: Find

 

function

fun Find.left_baseline(pict :: Pict, ....) :: Find

 

function

fun Find.left_bottom(pict :: Pict, ....) :: Find

 

function

fun Find.center_top(pict :: Pict, ....) :: Find

 

function

fun Find.center_topline(pict :: Pict, ....) :: Find

 

function

fun Find.center_center(pict :: Pict, ....) :: Find

 

function

fun Find.center_baseline(pict :: Pict, ....) :: Find

 

function

fun Find.center_bottom(pict :: Pict, ....) :: Find

 

function

fun Find.right_top(pict :: Pict, ....) :: Find

 

function

fun Find.right_topline(pict :: Pict, ....) :: Find

 

function

fun Find.right_center(pict :: Pict, ....) :: Find

 

function

fun Find.right_baseline(pict :: Pict, ....) :: Find

 

function

fun Find.right_bottom(pict :: Pict, ....) :: Find

 

function

fun Find.top_left(pict :: Pict, ....) :: Find

 

function

fun Find.top_center(pict :: Pict, ....) :: Find

 

function

fun Find.top_right(pict :: Pict, ....) :: Find

 

function

fun Find.topline_left(pict :: Pict, ....) :: Find

 

function

fun Find.topline_center(pict :: Pict, ....) :: Find

 

function

fun Find.center_left(pict :: Pict, ....) :: Find

 

function

fun Find.center_right(pict :: Pict, ....) :: Find

 

function

fun Find.baseline_left(pict :: Pict, ....) :: Find

 

function

fun Find.baseline_center(pict :: Pict, ....) :: Find

 

function

fun Find.baseline_right(pict :: Pict, ....) :: Find

 

function

fun Find.bottom(pict :: Pict, ....) :: Find

 

function

fun Find.bottom_left(pict :: Pict, ....) :: Find

 

function

fun Find.bottom_center(pict :: Pict, ....) :: Find

 

function

fun Find.bottom_right(pict :: Pict, ....) :: Find

Shorthands for Find at all combinations of ~horiz and ~vert arguments in all orders. Each shorthand takes the same arguments ad Find, except for the ~horiz and ~vert arguments.