qmap: Mapping coordinates

Description Usage Arguments Value Author(s)

Description

Transforms X and Y coordinates with a Qt-style transformation matrix. The advantage over direct use of Qt is vectorization.

Usage

1
qvmap(m, x, y)

Arguments

m

A matrix encoding the transformation, or something coercible to a matrix, like a C++ QTransform instance

x

X coordinates; if y is missing, should be something coercible to a numeric vector or matrix. If the vector coercion succeeds, the vector is coerced to a matrix with matrix(x, ncol = 2, byrow = TRUE). The first column is taken as X, the second as Y.

y

Y coordinates, optional

Value

The mapped coordinates, as a two column (X, Y) matrix, unless y is missing, in which case an attempt is made to coerce the result to the class of x, if any.

Author(s)

Michael Lawrence


qtpaint documentation built on May 2, 2019, 4 p.m.