MCPcopy Index your code
hub / github.com/benfry/processing4 / drawChar

Method drawChar

core/src/processing/core/PShapeSVG.java:1871–1879  ·  view source on GitHub ↗
(PGraphics g, char c, float x, float y, float size)

Source from the content-addressed store, hash-verified

1869
1870
1871 public void drawChar(PGraphics g, char c, float x, float y, float size) {
1872 g.pushMatrix();
1873 float s = size / face.unitsPerEm;
1874 g.translate(x, y);
1875 g.scale(s, -s);
1876 FontGlyph fg = unicodeGlyphs.get(Character.valueOf(c));
1877 if (fg != null) g.shape(fg);
1878 g.popMatrix();
1879 }
1880
1881
1882 public float textWidth(String str, float size) {

Callers

nothing calls this directly

Calls 6

translateMethod · 0.65
scaleMethod · 0.65
getMethod · 0.65
pushMatrixMethod · 0.45
shapeMethod · 0.45
popMatrixMethod · 0.45

Tested by

no test coverage detected