001/* 002 * To change this template, choose Tools | Templates 003 * and open the template in the editor. 004 */ 005package armyc2.c5isr.graphics2d; 006//import android.graphics.drawable.shapes.Shape; 007//import android.graphics.drawable.shapes.PathShape; 008//import android.graphics.Path; 009/** 010 * 011* 012 */ 013public class TextLayout { 014 Font _font=null; 015 String _str=""; 016 public TextLayout(String s, Font font, FontRenderContext frc) 017 { 018 _font=font; 019 _str=s; 020 //return; 021 } 022 public Shape getOutline(AffineTransform tx) 023 { 024 return new GeneralPath(); 025 } 026 //used by ShapeInfo 027 public Rectangle getPixelBounds(FontRenderContext frc, float x, float y) 028 { 029 return null; 030 } 031 public Rectangle getBounds() 032 { 033 int width=_font._size/2*_str.length(); 034 int height=_font.getSize(); 035 Rectangle rect=new Rectangle(0,0,width,height); 036 return rect; 037 } 038}