TextShapeFactory.java
Go to the documentation of this file.
00001 package org.ros.android.view.visualization.shape;
00002 
00003 import android.graphics.Typeface;
00004 
00005 import org.ros.android.view.visualization.VisualizationView;
00006 
00007 import javax.microedition.khronos.opengles.GL10;
00008 
00009 import uk.co.blogspot.fractiousg.texample.GLText;
00010 
00011 public class TextShapeFactory {
00012 
00013   private final GLText glText;
00014 
00015   public TextShapeFactory(final VisualizationView view, final GL10 gl) {
00016     glText = new GLText(gl, view.getContext().getAssets());
00017   }
00018 
00019   public void loadFont(final Typeface typeface, final int size, final int padX, final int padY) {
00020     glText.load(typeface, size, padX, padY);
00021   }
00022 
00023   public void loadFont(final String file, final int size, final int padX, final int padY) {
00024     glText.load(file, size, padX, padY);
00025   }
00026 
00027   public TextShape newTextShape(final String text) {
00028     return new TextShape(glText, text);
00029   }
00030 }


android_core
Author(s): Damon Kohler
autogenerated on Thu Jun 6 2019 21:20:07