Name
v4l2_rect_scale —
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
.