Package com.sun.opengl.util.j2d

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


    private class Renderer3D implements Renderer {

        private TextRenderer renderer;

        public void initRenderer(Font font) {
            renderer = new TextRenderer(font, antialised, fractionalMetrics, null, mipmap);
        }
View Full Code Here


        public void initRenderer(Font font) {
            renderer = new TextRenderer(font, antialised, fractionalMetrics, null, mipmap);
        }

        public void reinitRenderer() {
            renderer = new TextRenderer(renderer.getFont(), antialised, fractionalMetrics, null, mipmap);
        }
View Full Code Here

        private TextRenderer renderer;
        private static final float PIXEL_LIMIT = 3.5f;

        public void initRenderer(Font font) {
            renderer = new TextRenderer(font, antialised, fractionalMetrics, null, mipmap);
        }
View Full Code Here

        public void initRenderer(Font font) {
            renderer = new TextRenderer(font, antialised, fractionalMetrics, null, mipmap);
        }

        public void reinitRenderer() {
            renderer = new TextRenderer(renderer.getFont(), antialised, fractionalMetrics, null, mipmap);
        }
View Full Code Here

    }

    public void reflow(TextManager.Renderer renderer, int width, TextDataImpl text) {
        flowList.clear();
        int numLines = 0;
        TextRenderer joglRenderer = renderer.getJOGLRenderer();
        FontRenderContext frc = joglRenderer.getFontRenderContext();

        String paragraph = text.getLine().getText();
        Map attrs = new HashMap();
        attrs.put(TextAttribute.FONT, joglRenderer.getFont());
        AttributedString str = new AttributedString(paragraph, attrs);
        LineBreakMeasurer measurer = new LineBreakMeasurer(str.getIterator(), frc);
        int curPos = 0;
        while (measurer.getPosition() < paragraph.length()) {
            int nextPos = measurer.nextOffset(width);
View Full Code Here

    protected ResManager resourceManager;
 
  public TextLayer(ResManager res, ViewPort vp) {
    super(vp);
    resourceManager = res;
    _textRender = new TextRenderer(new Font("SansSerif", Font.BOLD, 14));
    _textRenderBack = new TextRenderer(new Font("SansSerif", Font.BOLD, 14));
  }
View Full Code Here

    protected ResManager resourceManager;

    public GUILayer(ResManager res, ViewPort vp) {
        super(vp);
        resourceManager = res;
        textRender = new TextRenderer(new Font("SansSerif", Font.BOLD, 14));
    }
View Full Code Here

  public FPSCounter(GLDrawable drawable,
                    Font font,
                    boolean antialiased,
                    boolean useFractionalMetrics) throws GLException {
    this.drawable = drawable;
    renderer = new TextRenderer(font, antialiased, useFractionalMetrics);
  }
View Full Code Here

    gl.glMatrixMode(GL.GL_MODELVIEW);        //select The Modelview Matrix
    gl.glLoadIdentity();              //set the ModelView matrix to identity
  }

  public void init(GLAutoDrawable glDrawable) {
     renderer = new TextRenderer(
         new Font("SansSerif", Font.BOLD, 10)
      );
   
    final GL gl = glDrawable.getGL();
    gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
View Full Code Here

  public Collection<Font> getCachedFonts() {
    return new HashSet<Font>(cachedFonts);
  }
  private void cache(Font font) {
    TextRenderer textRenderer = textRenderers.get(font);
    if(textRenderer == null) {
      textRenderer = new TextRenderer(font, true, false);
      this.textRenderers.put(font, textRenderer);
      this.cachedFonts.add(font);
    }
  }
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.