Add padding to sides of stimuli. This is a convenience function to calculate offsets for crop()
.
Arguments
- stimuli
list of stimuli
- top, right, bottom, left
number of pixels or proportion (<1) to pad each side
- ...
additional arguments to pass to
crop()
Details
The value for top is copied to bottom and right, and the value for right is copied to left, so setting only top produces a consistent border, while setting just top and right sets different borders for top-bottom and right-left. (This convention will be familiar if you use CSS.)
Padding size values are interpreted as a proportion of width or height if less than 1.