window_boundaries: Calculate the boundaries of a window, given a position and...

Description Usage Arguments Value

Description

Calculate the boundaries of a window, given a position and alignment. In a centered window the lower and upper bound are at equal distance from the index. Unless the windows is of even size, then the upper bound is 1 position closer to the center.

Usage

1
window_boundaries(idx, w_size, align = "center")

Arguments

idx

Index of window key

w_size

Size of window in points

align

Alignment of window, relative to idx. "center" means: idx is in the middle between lower and upper bound. "left" means: idx is on the left, so idx == lower bound. "right" means: idx is on the right, so idx == upper bound.

Value

A vector of length 2 containing the lower and upper bound.


jjongbloets/slideR documentation built on May 19, 2019, 11:40 a.m.