-
- unsigned int wdest = _rect.width() + (dwidth * _inc_x) /
- _inc_x * _inc_x + _base_x;
- unsigned int hdest = _rect.height() + (dheight * _inc_y) /
- _inc_y * _inc_y + _base_y;
-
- if (width > wdest) {
- while (width > wdest)
- wdest += _inc_x;
- } else {
- while (width < wdest)
- wdest -= _inc_x;
- }
- if (height > hdest) {
- while (height > hdest)
- hdest += _inc_y;
- } else {
- while (height < hdest)
- hdest -= _inc_y;
- }