MCPcopy Create free account
hub / github.com/benfry/processing4 / FontOutline

Class FontOutline

core/src/processing/opengl/PJOGL.java:719–741  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

717
718
719 protected class FontOutline implements PGL.FontOutline {
720 PathIterator iter;
721
722 public FontOutline(char ch, Font font) {
723 char[] textArray = new char[] { ch };
724 FontRenderContext frc = getFontRenderContext(font);
725 GlyphVector gv = font.createGlyphVector(frc, textArray);
726 Shape shp = gv.getOutline();
727 iter = shp.getPathIterator(null);
728 }
729
730 public boolean isDone() {
731 return iter.isDone();
732 }
733
734 public int currentSegment(float[] coords) {
735 return iter.currentSegment(coords);
736 }
737
738 public void next() {
739 iter.next();
740 }
741 }
742
743
744 ///////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected