MCPcopy Create free account
hub / github.com/NanoMichael/MicroTeX / init

Method init

src/atom/box.cpp:488–497  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

486/*************************************** scale box implementation *********************************/
487
488void 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
499void ScaleBox::draw(Graphics2D& g2, float x, float y) {
500 drawDebug(g2, x, y);

Callers

nothing calls this directly

Calls 2

deriveFontMethod · 0.45
getBoundsMethod · 0.45

Tested by

no test coverage detected