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

Method text

core/src/processing/core/PGraphics.java:4677–4694  ·  view source on GitHub ↗

Draws text to the screen. Displays the information specified in the first parameter on the screen in the position specified by the additional parameters. A default font will be used unless a font is set with the textFont() function and a default size will be used unless a font is set with

(char c, float x, float y)

Source from the content-addressed store, hash-verified

4675 * @see_external String
4676 */
4677 public void text(char c, float x, float y) {
4678 if (textFont == null) {
4679 defaultFontOrDeath("text");
4680 }
4681
4682 if (textAlignY == CENTER) {
4683 y += textAscent() / 2;
4684 } else if (textAlignY == TOP) {
4685 y += textAscent();
4686 } else if (textAlignY == BOTTOM) {
4687 y -= textDescent();
4688 //} else if (textAlignY == BASELINE) {
4689 // do nothing
4690 }
4691
4692 textBuffer[0] = c;
4693 textLineAlignImpl(textBuffer, 0, 1, x, y);
4694 }
4695
4696
4697 /**

Callers

nothing calls this directly

Calls 9

defaultFontOrDeathMethod · 0.95
textAscentMethod · 0.95
textDescentMethod · 0.95
textLineAlignImplMethod · 0.95
translateMethod · 0.95
textSentenceMethod · 0.95
floorMethod · 0.95
nfsMethod · 0.95
minMethod · 0.45

Tested by

no test coverage detected