Package com.badlogic.gdx.graphics.g2d

Examples of com.badlogic.gdx.graphics.g2d.BitmapFont


      deltaMultiplier.setAlwaysActive(true);

      backgroundColor = new GradientColorValue();
      backgroundColor.setColors(new float[] { 0f, 0f, 0f});

      font = new BitmapFont(Gdx.files.getFileHandle("default.fnt", FileType.Internal), Gdx.files.getFileHandle("default.png",
        FileType.Internal), true);
      effectPanel.newExampleEmitter("Untitled", true);
      // if (resources.openFile("/editor-bg.png") != null) bgImage = new Image(gl, "/editor-bg.png");
      Gdx.input.setInputProcessor(this);
    }
View Full Code Here


              @Override
              public void prepare () {
              }
            }));
            renderer.font = new BitmapFont(Gdx.files.absolute("out"), glyphRegion, false);
          }
        });
      }
    }.start();
  }
View Full Code Here

    @Override
    public void render () {
      int viewWidth = Gdx.graphics.getWidth();
      int viewHeight = Gdx.graphics.getHeight();

      BitmapFont font = this.font;
      if (font == null) {
        glClearColor(0, 0, 0, 0);
        GL11.glClear(GL11.GL_COLOR_BUFFER_BIT);
        return;
      }

      if (sampleTextRadio.isSelected()) {
        glClearColor(renderingBackgroundColor.r, renderingBackgroundColor.g, renderingBackgroundColor.b,
          renderingBackgroundColor.a);
        GL11.glClear(GL11.GL_COLOR_BUFFER_BIT);

        batch.begin();
        font.drawWrapped(batch, sampleTextPane.getText(), 0, viewHeight, viewWidth);
        batch.end();
      } else {
        glClearColor(1, 1, 1, 1);
        GL11.glClear(GL11.GL_COLOR_BUFFER_BIT);

        TextureRegion region = font.getRegion();
        float y = viewHeight - region.getRegionHeight();

        glColor4f(renderingBackgroundColor.r, renderingBackgroundColor.g, renderingBackgroundColor.b, 0);
        glBegin(GL_QUADS);
        glVertex3f(0, y + region.getRegionHeight(), 0);
View Full Code Here

     
      deltaMultiplier = new NumericValue();
      deltaMultiplier.setValue(1.0f);
      deltaMultiplier.setAlwaysActive(true);

      font = new BitmapFont(Gdx.files.getFileHandle("default.fnt", FileType.Internal), Gdx.files.getFileHandle("default.png",
        FileType.Internal), true);
      effectPanel.newExampleEmitter("Untitled", true);
      // if (resources.openFile("/editor-bg.png") != null) bgImage = new Image(gl, "/editor-bg.png");
      Gdx.input.setInputProcessor(this);
    }
View Full Code Here

              @Override
              public void prepare () {
              }
            }));
            renderer.font = new BitmapFont(Gdx.files.absolute("out"), glyphRegion, false);
          }
        });
      }
    }.start();
  }
View Full Code Here

    @Override
    public void render () {
      int viewWidth = Gdx.graphics.getWidth();
      int viewHeight = Gdx.graphics.getHeight();

      BitmapFont font = this.font;
      if (font == null) {
        glClearColor(0, 0, 0, 0);
        GL11.glClear(GL11.GL_COLOR_BUFFER_BIT);
        return;
      }

      if (sampleTextRadio.isSelected()) {
        glClearColor(renderingBackgroundColor.r, renderingBackgroundColor.g, renderingBackgroundColor.b,
          renderingBackgroundColor.a);
        GL11.glClear(GL11.GL_COLOR_BUFFER_BIT);

        batch.begin();
        font.drawWrapped(batch, sampleTextPane.getText(), 0, viewHeight, viewWidth);
        batch.end();
      } else {
        glClearColor(1, 1, 1, 1);
        GL11.glClear(GL11.GL_COLOR_BUFFER_BIT);

        TextureRegion region = font.getRegion();
        float y = viewHeight - region.getRegionHeight();

        glColor4f(renderingBackgroundColor.r, renderingBackgroundColor.g, renderingBackgroundColor.b, 0);
        glBegin(GL_QUADS);
        glVertex3f(0, y + region.getRegionHeight(), 0);
View Full Code Here

      deltaMultiplier.setAlwaysActive(true);

      backgroundColor = new GradientColorValue();
      backgroundColor.setColors(new float[] { 0f, 0f, 0f});

      font = new BitmapFont(Gdx.files.getFileHandle("default.fnt", FileType.Internal), Gdx.files.getFileHandle("default.png",
        FileType.Internal), true);
      effectPanel.newExampleEmitter("Untitled", true);
      // if (resources.openFile("/editor-bg.png") != null) bgImage = new Image(gl, "/editor-bg.png");
      Gdx.input.setInputProcessor(this);
    }
View Full Code Here

    camera = new OrthographicCamera(viewportWidth, viewportHeight);
    camera.position.set(0, viewportHeight / 2f, 0);
    camera.update();
   
    batch = new SpriteBatch();
    font = new BitmapFont();
    font.setColor(Color.RED);
   
    textureRegion = new TextureRegion(new Texture(
        Gdx.files.internal("data/marble.png")));
    bg = new Texture(Gdx.files.internal("data/bg.png"));
View Full Code Here

        FileHandle path1 = new FileHandle (fromFonts.file1);
        FileHandle path2 = new FileHandle (fromFonts.file2);
       
        //if (fromFonts.font.font.isFlipped()) {
        font = new BitmapFont (path1, path2, false);       
        //} else {
        //font = new BitmapFont (path1, path2, true);                   
        //}
       
        fontInfo = fromFonts;               
View Full Code Here

    }
   
    public TransientGDXFont (String fromFile, String fromFile2) {
        FileHandle path1 = new FileHandle (fromFile);
        FileHandle path2 = new FileHandle (fromFile2);
        font = new BitmapFont (path1, path2, false);
    }
View Full Code Here

TOP

Related Classes of com.badlogic.gdx.graphics.g2d.BitmapFont

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.