v4l2_rect_scale(9) scale rect r by to/from

SYNOPSIS

void v4l2_rect_scale(struct v4l2_rect * r, const struct v4l2_rect * from, const struct v4l2_rect * to);

ARGUMENTS

r

rect to be scaled.

from

from rectangle.

to

to rectangle.

DESCRIPTION

This scales rectangle r horizontally by to->width / from->width and vertically by to->height / from->height.

Typically r is a rectangle inside from and you want the rectangle as it would appear after scaling from to to. So the resulting r will be the scaled rectangle inside to.

COPYRIGHT