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

Method draw

src/render.cpp:81–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81void TeXRender::draw(_out_ Graphics2D& g2, int x, int y) {
82 color old = g2.getColor();
83 g2.scale(_textSize, _textSize);
84 if (!istrans(_fg)) {
85 g2.setColor(_fg);
86 } else {
87 g2.setColor(_defaultcolor);
88 }
89
90 // draw formula box
91 _box->draw(g2, (x + _insets.left) / _textSize, (y + _insets.top) / _textSize + _box->_height);
92
93 // restore
94 g2.reset();
95 g2.setColor(old);
96}
97
98DefaultTeXFont* TeXRenderBuilder::createFont(float size, int type) {
99 DefaultTeXFont* tf = new DefaultTeXFont(size);

Callers

nothing calls this directly

Calls 5

istransFunction · 0.85
getColorMethod · 0.45
scaleMethod · 0.45
setColorMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected