mod_dilate: Add a dilation modification to a shape

View source: R/add_mod.R

mod_dilateR Documentation

Add a dilation modification to a shape

Description

A dilation modification squeezes and/or stretches a shape in the x and y directions. Dilations are not valid for refline shapes.

Usage

mod_dilate(pj, x, y, mx, my, shape = ".", name = ".")

Arguments

pj

an object of class 'pj'.

x

integer vector identifying vertical fixed points for anchoring shapes in dilation.

mx

positive numeric vector giving the value by which to multiply shape width (x direction).

my

positive numeric vector giving the value by which to multiply shape height (y direction).

shape

character scalar indicating the type of shape to which the mod will be applied.

name

character scalar name to give to the specified mod. The special value "." indicates that the pj package should create a default name for the mod.

Value

pj with the dilation modification applied to the specified shape.

Argument recycling

The argument set {x, y, mx, my, xu, yu} is recycled with the number of subshapes defined for a given shape. For point, area, and ribbon shapes, all arguments in the set must be scalar. For segment shapes, arguments in the set must be recyclable with the number of segments defined by that shape. For shapes that define polygons, arguments in the set must be recyclable with the number of polygons defined by the shape.

See Also

Other add_mod: mod_reflect(), mod_rotate(), mod_translate()


j-martineau/pj documentation built on March 19, 2022, 5:32 a.m.