Package com.sun.opengl.util.j2d

Examples of com.sun.opengl.util.j2d.TextRenderer


      this.cachedFonts.add(font);
    }
  }
  private void freeFontCache(Font font) {
    if(LOGGER.isLoggable(Level.FINER)) LOGGER.finer("Free cached font: " + font);
    TextRenderer renderer = textRenderers.get(font);
    if(renderer != null) {
      renderer.dispose();
      textRenderers.remove(font);
      cachedFonts.remove(font);
    }
  }
View Full Code Here


    }
  }
  private void freeFontCache() {
    if(LOGGER.isLoggable(Level.FINER)) LOGGER.finer("Free cached fonts");
    for(Font font: cachedFonts) {
      TextRenderer renderer = textRenderers.get(font);
      renderer.dispose();
    }
    textRenderers.clear();
    cachedFonts.clear();
  }
View Full Code Here

    textRenderers.clear();
    cachedFonts.clear();
  }

  TextRenderer getTextRenderer(Font font) {
    TextRenderer textRenderer = textRenderers.get(font);
    if(textRenderer == null) {
      cacheFont(font);
      textRenderer = textRenderers.get(font);
      if(textRenderer == null) throw new RuntimeException("Unable to cache font: " + font);
    }
View Full Code Here

  // ==================== Text ====================
  public void drawText(String text) {
    if (text == null) throw new IllegalArgumentException("text must not be null");
    endPrimitives();
    TextRenderer textRenderer = resourceManager.getTextRenderer(font);
    textRenderer.begin3DRendering();
    applyColor();
    setTextTransformation();
    textRenderer.draw(text, 0, 0);
    textRenderer.end3DRendering();
    setTransform();
  }
View Full Code Here

TOP

Related Classes of com.sun.opengl.util.j2d.TextRenderer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.