Path: blob/master/SLICK_HOME/src/org/newdawn/slick/Font.java
1456 views
package org.newdawn.slick;123/**4* The proprites of any font implementation5*6* @author Kevin Glass7*/8public interface Font {9/**10* Get the width of the given string11*12* @param str The string to obtain the rendered with of13* @return The width of the given string14*/15public abstract int getWidth(String str);1617/**18* Get the height of the given string19*20* @param str The string to obtain the rendered with of21* @return The width of the given string22*/23public abstract int getHeight(String str);2425/**26* Get the maximum height of any line drawn by this font27*28* @return The maxium height of any line drawn by this font29*/30public int getLineHeight();3132/**33* Draw a string to the screen34*35* @param x The x location at which to draw the string36* @param y The y location at which to draw the string37* @param text The text to be displayed38*/39public abstract void drawString(float x, float y, String text);4041/**42* Draw a string to the screen43*44* @param x The x location at which to draw the string45* @param y The y location at which to draw the string46* @param text The text to be displayed47* @param col The colour to draw with48*/49public abstract void drawString(float x, float y, String text, Color col);505152/**53* Draw part of a string to the screen. Note that this will54* still position the text as though it's part of the bigger string.55*56* @param x The x location at which to draw the string57* @param y The y location at which to draw the string58* @param text The text to be displayed59* @param col The colour to draw with60* @param startIndex The index of the first character to draw61* @param endIndex The index of the last character from the string to draw62*/63public abstract void drawString(float x, float y, String text, Color col, int startIndex, int endIndex);64}6566