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

Method textCharImpl

core/src/processing/core/PGraphics.java:5122–5144  ·  view source on GitHub ↗
(char ch, float x, float y)

Source from the content-addressed store, hash-verified

5120
5121
5122 protected void textCharImpl(char ch, float x, float y) { //, float z) {
5123 PFont.Glyph glyph = textFont.getGlyph(ch);
5124 if (glyph != null) {
5125 if (textMode == MODEL) {
5126 float floatSize = textFont.getSize();
5127 float high = glyph.height / floatSize;
5128 float wide = glyph.width / floatSize;
5129 float leftExtent = glyph.leftExtent / floatSize;
5130 float topExtent = glyph.topExtent / floatSize;
5131
5132 float x1 = x + leftExtent * textSize;
5133 float y1 = y - topExtent * textSize;
5134 float x2 = x1 + wide * textSize;
5135 float y2 = y1 + high * textSize;
5136
5137 textCharModelImpl(glyph.image,
5138 x1, y1, x2, y2,
5139 glyph.width, glyph.height);
5140 }
5141 } else if (ch != ' ' && ch != 127) {
5142 showWarning("No glyph found for the " + ch + " (\\u" + PApplet.hex(ch, 4) + ") character");
5143 }
5144 }
5145
5146
5147 protected void textCharModelImpl(PImage glyph,

Callers 1

textLineImplMethod · 0.95

Calls 5

textCharModelImplMethod · 0.95
showWarningMethod · 0.95
hexMethod · 0.95
getGlyphMethod · 0.80
getSizeMethod · 0.80

Tested by

no test coverage detected