(char ch, float x, float y)
| 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, |
no test coverage detected