| 486 | /*************************************** scale box implementation *********************************/ |
| 487 | |
| 488 | void ScaleBox::init(const sptr<Box>& b, float sx, float sy) { |
| 489 | _factor = 1; |
| 490 | _box = b; |
| 491 | _sx = (isnan(sx) || isinf(sx)) ? 1 : sx; |
| 492 | _sy = (isnan(sy) || isinf(sy)) ? 1 : sy; |
| 493 | _width = b->_width * abs(_sx); |
| 494 | _height = _sy > 0 ? b->_height * _sy : -b->_depth * _sy; |
| 495 | _depth = _sy > 0 ? b->_depth * _sy : -b->_height * _sy; |
| 496 | _shift = b->_shift * _sy; |
| 497 | } |
| 498 | |
| 499 | void ScaleBox::draw(Graphics2D& g2, float x, float y) { |
| 500 | drawDebug(g2, x, y); |
nothing calls this directly
no test coverage detected