Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int x1 = a.x(), y1 = a.y(),
- x2 = x1 + a.width(), y2 = y1 + a.height();
- long double dx = (right - left) * 1.0 / this->width(),
- dy = (top - bottom) * 1.0 / this->height();
- long double xr1 = left + x1 * dx, yr1 = bottom + y1 * dy,
- xr2 = left + x2 * dx, yr2 = bottom + y2 * dy;
- left = xr1, right = xr2, bottom = yr1, top = yr2;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement