MCPcopy Create free account
hub / github.com/melonjs/melonJS / setContextStyle

Function setContextStyle

packages/melonjs/src/renderable/text/textstyle.js:5–12  ·  view source on GitHub ↗
(context, style)

Source from the content-addressed store, hash-verified

3 * @ignore
4 */
5export default function setContextStyle(context, style) {
6 context.font = style.font;
7 context.fillStyle = style.fillStyle.toRGBA();
8 context.strokeStyle = style.strokeStyle.toRGBA();
9 context.lineWidth = style.lineWidth;
10 context.textAlign = style.textAlign;
11 context.textBaseline = style.textBaseline;
12}

Callers 3

_drawFontMethod · 0.85
measureTextMethod · 0.85
wordWrapMethod · 0.85

Calls 1

toRGBAMethod · 0.80

Tested by

no test coverage detected