<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_17) on Sun Nov 03 15:35:44 CET 2013 -->
<title>BitmapFontCache (libgdx API)
</title>
<meta name="date" content="2013-11-03">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="BitmapFontCache (libgdx API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.
</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview
</a></li>
<li><a href="package-summary.html">Package
</a></li>
<li class="navBarCell1Rev">Class
</li>
<li><a href="class-use/BitmapFontCache.html">Use
</a></li>
<li><a href="package-tree.html">Tree
</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated
</a></li>
<li><a href="../../../../../index-all.html">Index
</a></li>
<li><a href="../../../../../help-doc.html">Help
</a></li>
</ul>
<div class="aboutLanguage"><em>
libgdx API
<style>
body, td, th { font-family:Helvetica, Tahoma, Arial, sans-serif; font-size:10pt }
pre, code, tt { font-size:9pt; font-family:Lucida Console, Courier New, sans-serif }
h1, h2, h3, .FrameTitleFont, .FrameHeadingFont, .TableHeadingColor font { font-size:105%; font-weight:bold }
.TableHeadingColor { background:#EEEEFF; }
a { text-decoration:none }
a:hover { text-decoration:underline }
a:link, a:visited { color:blue }
table { border:0px }
.TableRowColor td:first-child { border-left:1px solid black }
.TableRowColor td { border:0px; border-bottom:1px solid black; border-right:1px solid black }
hr { border:0px; border-bottom:1px solid #333366; }
</style>
</em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.TextBounds.html" title="class in com.badlogic.gdx.graphics.g2d"><span class="strong">Prev Class
</span></a></li>
<li><a href="../../../../../com/badlogic/gdx/graphics/g2d/Gdx2DPixmap.html" title="class in com.badlogic.gdx.graphics.g2d"><span class="strong">Next Class
</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?com/badlogic/gdx/graphics/g2d/BitmapFontCache.html" target="_top">Frames
</a></li>
<li><a href="BitmapFontCache.html" target="_top">No Frames
</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes
</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:
</li>
<li>Nested
|
</li>
<li>Field
|
</li>
<li><a href="#constructor_summary">Constr
</a> |
</li>
<li><a href="#method_summary">Method
</a></li>
</ul>
<ul class="subNavList">
<li>Detail:
</li>
<li>Field
|
</li>
<li><a href="#constructor_detail">Constr
</a> |
</li>
<li><a href="#method_detail">Method
</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">com.badlogic.gdx.graphics.g2d
</div>
<h2 title="Class BitmapFontCache" class="title">Class BitmapFontCache
</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object
</li>
<li>
<ul class="inheritance">
<li>com.badlogic.gdx.graphics.g2d.BitmapFontCache
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class
<span class="strong">BitmapFontCache
</span>
extends java.lang.Object
</pre>
<div class="block">Caches glyph geometry for a BitmapFont, providing a fast way to render static text. This saves needing to compute the location
of each glyph each frame.
</div>
<dl><dt><span class="strong">Author:
</span></dt>
<dd>Nathan Sweet, Matthias Mann
</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary
</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors
</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description
</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#BitmapFontCache(com.badlogic.gdx.graphics.g2d.BitmapFont)">BitmapFontCache
</a></strong>(
<a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.html" title="class in com.badlogic.gdx.graphics.g2d">BitmapFont
</a> font)
</code> </td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#BitmapFontCache(com.badlogic.gdx.graphics.g2d.BitmapFont, boolean)">BitmapFontCache
</a></strong>(
<a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.html" title="class in com.badlogic.gdx.graphics.g2d">BitmapFont
</a> font,
boolean
integer)
</code>
<div class="block">Creates a new BitmapFontCache
</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary
</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods
</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type
</th>
<th class="colLast" scope="col">Method and Description
</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.TextBounds.html" title="class in com.badlogic.gdx.graphics.g2d">BitmapFont.TextBounds
</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#addMultiLineText(java.lang.CharSequence, float, float)">addMultiLineText
</a></strong>(java.lang.CharSequence
str,
float
x,
float
y)
</code>
<div class="block">Adds glyphs for the specified text, which may contain newlines (\n).
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.TextBounds.html" title="class in com.badlogic.gdx.graphics.g2d">BitmapFont.TextBounds
</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#addMultiLineText(java.lang.CharSequence, float, float, float, com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment)">addMultiLineText
</a></strong>(java.lang.CharSequence
str,
float
x,
float
y,
float
alignmentWidth,
<a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.HAlignment.html" title="enum in com.badlogic.gdx.graphics.g2d">BitmapFont.HAlignment
</a> alignment)
</code>
<div class="block">Adds glyphs for the specified text, which may contain newlines (\n).
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.TextBounds.html" title="class in com.badlogic.gdx.graphics.g2d">BitmapFont.TextBounds
</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#addText(java.lang.CharSequence, float, float)">addText
</a></strong>(java.lang.CharSequence
str,
float
x,
float
y)
</code>
<div class="block">Adds glyphs for the specified text.
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.TextBounds.html" title="class in com.badlogic.gdx.graphics.g2d">BitmapFont.TextBounds
</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#addText(java.lang.CharSequence, float, float, int, int)">addText
</a></strong>(java.lang.CharSequence
str,
float
x,
float
y,
int
start,
int
end)
</code>
<div class="block">Adds glyphs for the the specified text.
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.TextBounds.html" title="class in com.badlogic.gdx.graphics.g2d">BitmapFont.TextBounds
</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#addWrappedText(java.lang.CharSequence, float, float, float)">addWrappedText
</a></strong>(java.lang.CharSequence
str,
float
x,
float
y,
float
wrapWidth)
</code>
<div class="block">Adds glyphs for the specified text, which may contain newlines (\n) and is automatically wrapped within the specified width.
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.TextBounds.html" title="class in com.badlogic.gdx.graphics.g2d">BitmapFont.TextBounds
</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#addWrappedText(java.lang.CharSequence, float, float, float, com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment)">addWrappedText
</a></strong>(java.lang.CharSequence
str,
float
x,
float
y,
float
wrapWidth,
<a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.HAlignment.html" title="enum in com.badlogic.gdx.graphics.g2d">BitmapFont.HAlignment
</a> alignment)
</code>
<div class="block">Adds glyphs for the specified text, which may contain newlines (\n) and is automatically wrapped within the specified width.
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void
</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#clear()">clear
</a></strong>()
</code>
<div class="block">Removes all glyphs in the cache.
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void
</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#draw(com.badlogic.gdx.graphics.g2d.SpriteBatch)">draw
</a></strong>(
<a href="../../../../../com/badlogic/gdx/graphics/g2d/SpriteBatch.html" title="class in com.badlogic.gdx.graphics.g2d">SpriteBatch
</a> spriteBatch)
</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void
</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#draw(com.badlogic.gdx.graphics.g2d.SpriteBatch, float)">draw
</a></strong>(
<a href="../../../../../com/badlogic/gdx/graphics/g2d/SpriteBatch.html" title="class in com.badlogic.gdx.graphics.g2d">SpriteBatch
</a> spriteBatch,
float
alphaModulation)
</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void
</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#draw(com.badlogic.gdx.graphics.g2d.SpriteBatch, int, int)">draw
</a></strong>(
<a href="../../../../../com/badlogic/gdx/graphics/g2d/SpriteBatch.html" title="class in com.badlogic.gdx.graphics.g2d">SpriteBatch
</a> spriteBatch,
int
start,
int
end)
</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.TextBounds.html" title="class in com.badlogic.gdx.graphics.g2d">BitmapFont.TextBounds
</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#getBounds()">getBounds
</a></strong>()
</code>
<div class="block">Returns the size of the cached string.
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../com/badlogic/gdx/graphics/Color.html" title="class in com.badlogic.gdx.graphics">Color
</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#getColor()">getColor
</a></strong>()
</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.html" title="class in com.badlogic.gdx.graphics.g2d">BitmapFont
</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#getFont()">getFont
</a></strong>()
</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>float[]
</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#getVertices()">getVertices
</a></strong>()
</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>float[]
</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#getVertices(int)">getVertices
</a></strong>(int
page)
</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>float
</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#getX()">getX
</a></strong>()
</code>
<div class="block">Returns the x position of the cached string, relative to the position when the string was cached.
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>float
</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#getY()">getY
</a></strong>()
</code>
<div class="block">Returns the y position of the cached string, relative to the position when the string was cached.
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void
</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#setColor(com.badlogic.gdx.graphics.Color)">setColor
</a></strong>(
<a href="../../../../../com/badlogic/gdx/graphics/Color.html" title="class in com.badlogic.gdx.graphics">Color
</a> tint)
</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void
</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#setColor(com.badlogic.gdx.graphics.Color, int, int)">setColor
</a></strong>(
<a href="../../../../../com/badlogic/gdx/graphics/Color.html" title="class in com.badlogic.gdx.graphics">Color
</a> tint,
int
start,
int
end)
</code>
<div class="block">Sets the color of the specified characters.
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void
</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#setColor(float)">setColor
</a></strong>(float
color)
</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void
</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#setColor(float, float, float, float)">setColor
</a></strong>(float
r,
float
g,
float
b,
float
a)
</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.TextBounds.html" title="class in com.badlogic.gdx.graphics.g2d">BitmapFont.TextBounds
</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#setMultiLineText(java.lang.CharSequence, float, float)">setMultiLineText
</a></strong>(java.lang.CharSequence
str,
float
x,
float
y)
</code>
<div class="block">Clears any cached glyphs and adds glyphs for the specified text, which may contain newlines (\n).
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.TextBounds.html" title="class in com.badlogic.gdx.graphics.g2d">BitmapFont.TextBounds
</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#setMultiLineText(java.lang.CharSequence, float, float, float, com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment)">setMultiLineText
</a></strong>(java.lang.CharSequence
str,
float
x,
float
y,
float
alignmentWidth,
<a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.HAlignment.html" title="enum in com.badlogic.gdx.graphics.g2d">BitmapFont.HAlignment
</a> alignment)
</code>
<div class="block">Clears any cached glyphs and adds glyphs for the specified text, which may contain newlines (\n).
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void
</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#setPosition(float, float)">setPosition
</a></strong>(float
x,
float
y)
</code>
<div class="block">Sets the position of the text, relative to the position when the cached text was created.
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.TextBounds.html" title="class in com.badlogic.gdx.graphics.g2d">BitmapFont.TextBounds
</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#setText(java.lang.CharSequence, float, float)">setText
</a></strong>(java.lang.CharSequence
str,
float
x,
float
y)
</code>
<div class="block">Clears any cached glyphs and adds glyphs for the specified text.
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.TextBounds.html" title="class in com.badlogic.gdx.graphics.g2d">BitmapFont.TextBounds
</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#setText(java.lang.CharSequence, float, float, int, int)">setText
</a></strong>(java.lang.CharSequence
str,
float
x,
float
y,
int
start,
int
end)
</code>
<div class="block">Clears any cached glyphs and adds glyphs for the specified text.
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void
</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#setUseIntegerPositions(boolean)">setUseIntegerPositions
</a></strong>(boolean
use)
</code>
<div class="block">Specifies whether to use integer positions or not.
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.TextBounds.html" title="class in com.badlogic.gdx.graphics.g2d">BitmapFont.TextBounds
</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#setWrappedText(java.lang.CharSequence, float, float, float)">setWrappedText
</a></strong>(java.lang.CharSequence
str,
float
x,
float
y,
float
wrapWidth)
</code>
<div class="block">Clears any cached glyphs and adds glyphs for the specified text, which may contain newlines (\n) and is automatically
wrapped within the specified width.
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.TextBounds.html" title="class in com.badlogic.gdx.graphics.g2d">BitmapFont.TextBounds
</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#setWrappedText(java.lang.CharSequence, float, float, float, com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment)">setWrappedText
</a></strong>(java.lang.CharSequence
str,
float
x,
float
y,
float
wrapWidth,
<a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.HAlignment.html" title="enum in com.badlogic.gdx.graphics.g2d">BitmapFont.HAlignment
</a> alignment)
</code>
<div class="block">Clears any cached glyphs and adds glyphs for the specified text, which may contain newlines (\n) and is automatically
wrapped within the specified width.
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void
</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#translate(float, float)">translate
</a></strong>(float
xAmount,
float
yAmount)
</code>
<div class="block">Sets the position of the text, relative to its current position.
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean
</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#usesIntegerPositions()">usesIntegerPositions
</a></strong>()
</code> </td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class
java.lang.Object
</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail
</h3>
<a name="BitmapFontCache(com.badlogic.gdx.graphics.g2d.BitmapFont)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BitmapFontCache
</h4>
<pre>public
BitmapFontCache(
<a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.html" title="class in com.badlogic.gdx.graphics.g2d">BitmapFont
</a> font)
</pre>
</li>
</ul>
<a name="BitmapFontCache(com.badlogic.gdx.graphics.g2d.BitmapFont, boolean)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>BitmapFontCache
</h4>
<pre>public
BitmapFontCache(
<a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.html" title="class in com.badlogic.gdx.graphics.g2d">BitmapFont
</a> font,
boolean
integer)
</pre>
<div class="block">Creates a new BitmapFontCache
</div>
<dl><dt><span class="strong">Parameters:
</span></dt><dd><code>font
</code> - the font to use
</dd><dd><code>integer
</code> - whether to use integer positions and sizes.
</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail
</h3>
<a name="setPosition(float, float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPosition
</h4>
<pre>public
void
setPosition(float
x,
float
y)
</pre>
<div class="block">Sets the position of the text, relative to the position when the cached text was created.
</div>
<dl><dt><span class="strong">Parameters:
</span></dt><dd><code>x
</code> - The x coordinate
</dd><dd><code>y
</code> - The y coodinate
</dd></dl>
</li>
</ul>
<a name="translate(float, float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>translate
</h4>
<pre>public
void
translate(float
xAmount,
float
yAmount)
</pre>
<div class="block">Sets the position of the text, relative to its current position.
</div>
<dl><dt><span class="strong">Parameters:
</span></dt><dd><code>xAmount
</code> - The amount in x to move the text
</dd><dd><code>yAmount
</code> - The amount in y to move the text
</dd></dl>
</li>
</ul>
<a name="setColor(float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setColor
</h4>
<pre>public
void
setColor(float
color)
</pre>
</li>
</ul>
<a name="setColor(com.badlogic.gdx.graphics.Color)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setColor
</h4>
<pre>public
void
setColor(
<a href="../../../../../com/badlogic/gdx/graphics/Color.html" title="class in com.badlogic.gdx.graphics">Color
</a> tint)
</pre>
</li>
</ul>
<a name="setColor(float, float, float, float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setColor
</h4>
<pre>public
void
setColor(float
r,
float
g,
float
b,
float
a)
</pre>
</li>
</ul>
<a name="setColor(com.badlogic.gdx.graphics.Color, int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setColor
</h4>
<pre>public
void
setColor(
<a href="../../../../../com/badlogic/gdx/graphics/Color.html" title="class in com.badlogic.gdx.graphics">Color
</a> tint,
int
start,
int
end)
</pre>
<div class="block">Sets the color of the specified characters. This may only be called after
<a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#setText(java.lang.CharSequence, float, float)"><code>setText(CharSequence, float, float)
</code></a> and
is reset every time setText is called.
</div>
</li>
</ul>
<a name="draw(com.badlogic.gdx.graphics.g2d.SpriteBatch)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>draw
</h4>
<pre>public
void
draw(
<a href="../../../../../com/badlogic/gdx/graphics/g2d/SpriteBatch.html" title="class in com.badlogic.gdx.graphics.g2d">SpriteBatch
</a> spriteBatch)
</pre>
</li>
</ul>
<a name="draw(com.badlogic.gdx.graphics.g2d.SpriteBatch, int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>draw
</h4>
<pre>public
void
draw(
<a href="../../../../../com/badlogic/gdx/graphics/g2d/SpriteBatch.html" title="class in com.badlogic.gdx.graphics.g2d">SpriteBatch
</a> spriteBatch,
int
start,
int
end)
</pre>
</li>
</ul>
<a name="draw(com.badlogic.gdx.graphics.g2d.SpriteBatch, float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>draw
</h4>
<pre>public
void
draw(
<a href="../../../../../com/badlogic/gdx/graphics/g2d/SpriteBatch.html" title="class in com.badlogic.gdx.graphics.g2d">SpriteBatch
</a> spriteBatch,
float
alphaModulation)
</pre>
</li>
</ul>
<a name="getColor()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getColor
</h4>
<pre>public
<a href="../../../../../com/badlogic/gdx/graphics/Color.html" title="class in com.badlogic.gdx.graphics">Color
</a> getColor()
</pre>
</li>
</ul>
<a name="clear()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clear
</h4>
<pre>public
void
clear()
</pre>
<div class="block">Removes all glyphs in the cache.
</div>
</li>
</ul>
<a name="setText(java.lang.CharSequence, float, float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setText
</h4>
<pre>public
<a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.TextBounds.html" title="class in com.badlogic.gdx.graphics.g2d">BitmapFont.TextBounds
</a> setText(java.lang.CharSequence
str,
float
x,
float
y)
</pre>
<div class="block">Clears any cached glyphs and adds glyphs for the specified text.
</div>
<dl><dt><span class="strong">See Also:
</span></dt><dd><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#addText(java.lang.CharSequence, float, float, int, int)"><code>addText(CharSequence, float, float, int, int)
</code></a></dd></dl>
</li>
</ul>
<a name="setText(java.lang.CharSequence, float, float, int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setText
</h4>
<pre>public
<a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.TextBounds.html" title="class in com.badlogic.gdx.graphics.g2d">BitmapFont.TextBounds
</a> setText(java.lang.CharSequence
str,
float
x,
float
y,
int
start,
int
end)
</pre>
<div class="block">Clears any cached glyphs and adds glyphs for the specified text.
</div>
<dl><dt><span class="strong">See Also:
</span></dt><dd><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#addText(java.lang.CharSequence, float, float, int, int)"><code>addText(CharSequence, float, float, int, int)
</code></a></dd></dl>
</li>
</ul>
<a name="addText(java.lang.CharSequence, float, float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addText
</h4>
<pre>public
<a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.TextBounds.html" title="class in com.badlogic.gdx.graphics.g2d">BitmapFont.TextBounds
</a> addText(java.lang.CharSequence
str,
float
x,
float
y)
</pre>
<div class="block">Adds glyphs for the specified text.
</div>
<dl><dt><span class="strong">See Also:
</span></dt><dd><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFontCache.html#addText(java.lang.CharSequence, float, float, int, int)"><code>addText(CharSequence, float, float, int, int)
</code></a></dd></dl>
</li>
</ul>
<a name="addText(java.lang.CharSequence, float, float, int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addText
</h4>
<pre>public
<a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.TextBounds.html" title="class in com.badlogic.gdx.graphics.g2d">BitmapFont.TextBounds
</a> addText(java.lang.CharSequence
str,
float
x,
float
y,
int
start,
int
end)
</pre>
<div class="block">Adds glyphs for the the specified text.
</div>
<dl><dt><span class="strong">Parameters:
</span></dt><dd><code>x
</code> - The x position for the left most character.
</dd><dd><code>y
</code> - The y position for the top of most capital letters in the font (the
<a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.html#getCapHeight()"><code>cap height
</code></a>).
</dd><dd><code>start
</code> - The first character of the string to draw.
</dd><dd><code>end
</code> - The last character of the string to draw (exclusive).
</dd>
<dt><span class="strong">Returns:
</span></dt><dd>The bounds of the cached string (the height is the distance from y to the baseline).
</dd></dl>
</li>
</ul>
<a name="setMultiLineText(java.lang.CharSequence, float, float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMultiLineText
</h4>
<pre>public
<a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.TextBounds.html" title="class in com.badlogic.gdx.graphics.g2d">BitmapFont.TextBounds
</a> setMultiLineText(java.lang.CharSequence
str,
float
x,
float
y)
</pre>
<div class="block">Clears any cached glyphs and adds glyphs for the specified text, which may contain newlines (\n).
</div>
<dl><dt><span class="strong">See Also:
</span></dt><dd><code>#addMultiLineText(CharSequence, float, float, float, HAlignment)
</code></dd></dl>
</li>
</ul>
<a name="setMultiLineText(java.lang.CharSequence, float, float, float, com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMultiLineText
</h4>
<pre>public
<a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.TextBounds.html" title="class in com.badlogic.gdx.graphics.g2d">BitmapFont.TextBounds
</a> setMultiLineText(java.lang.CharSequence
str,
float
x,
float
y,
float
alignmentWidth,
<a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.HAlignment.html" title="enum in com.badlogic.gdx.graphics.g2d">BitmapFont.HAlignment
</a> alignment)
</pre>
<div class="block">Clears any cached glyphs and adds glyphs for the specified text, which may contain newlines (\n).
</div>
<dl><dt><span class="strong">See Also:
</span></dt><dd><code>#addMultiLineText(CharSequence, float, float, float, HAlignment)
</code></dd></dl>
</li>
</ul>
<a name="addMultiLineText(java.lang.CharSequence, float, float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addMultiLineText
</h4>
<pre>public
<a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.TextBounds.html" title="class in com.badlogic.gdx.graphics.g2d">BitmapFont.TextBounds
</a> addMultiLineText(java.lang.CharSequence
str,
float
x,
float
y)
</pre>
<div class="block">Adds glyphs for the specified text, which may contain newlines (\n).
</div>
<dl><dt><span class="strong">See Also:
</span></dt><dd><code>#addMultiLineText(CharSequence, float, float, float, HAlignment)
</code></dd></dl>
</li>
</ul>
<a name="addMultiLineText(java.lang.CharSequence, float, float, float, com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addMultiLineText
</h4>
<pre>public
<a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.TextBounds.html" title="class in com.badlogic.gdx.graphics.g2d">BitmapFont.TextBounds
</a> addMultiLineText(java.lang.CharSequence
str,
float
x,
float
y,
float
alignmentWidth,
<a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.HAlignment.html" title="enum in com.badlogic.gdx.graphics.g2d">BitmapFont.HAlignment
</a> alignment)
</pre>
<div class="block">Adds glyphs for the specified text, which may contain newlines (\n). Each line is aligned horizontally within a rectangle of
the specified width.
</div>
<dl><dt><span class="strong">Parameters:
</span></dt><dd><code>x
</code> - The x position for the left most character.
</dd><dd><code>y
</code> - The y position for the top of most capital letters in the font (the
<a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.html#getCapHeight()"><code>cap height
</code></a>).
</dd><dd><code>alignment
</code> - The horizontal alignment of wrapped line.
</dd>
<dt><span class="strong">Returns:
</span></dt><dd>The bounds of the cached string (the height is the distance from y to the baseline of the last line).
</dd></dl>
</li>
</ul>
<a name="setWrappedText(java.lang.CharSequence, float, float, float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setWrappedText
</h4>
<pre>public
<a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.TextBounds.html" title="class in com.badlogic.gdx.graphics.g2d">BitmapFont.TextBounds
</a> setWrappedText(java.lang.CharSequence
str,
float
x,
float
y,
float
wrapWidth)
</pre>
<div class="block">Clears any cached glyphs and adds glyphs for the specified text, which may contain newlines (\n) and is automatically
wrapped within the specified width.
</div>
<dl><dt><span class="strong">See Also:
</span></dt><dd><code>#addWrappedText(CharSequence, float, float, float, HAlignment)
</code></dd></dl>
</li>
</ul>
<a name="setWrappedText(java.lang.CharSequence, float, float, float, com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setWrappedText
</h4>
<pre>public
<a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.TextBounds.html" title="class in com.badlogic.gdx.graphics.g2d">BitmapFont.TextBounds
</a> setWrappedText(java.lang.CharSequence
str,
float
x,
float
y,
float
wrapWidth,
<a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.HAlignment.html" title="enum in com.badlogic.gdx.graphics.g2d">BitmapFont.HAlignment
</a> alignment)
</pre>
<div class="block">Clears any cached glyphs and adds glyphs for the specified text, which may contain newlines (\n) and is automatically
wrapped within the specified width.
</div>
<dl><dt><span class="strong">See Also:
</span></dt><dd><code>#addWrappedText(CharSequence, float, float, float, HAlignment)
</code></dd></dl>
</li>
</ul>
<a name="addWrappedText(java.lang.CharSequence, float, float, float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addWrappedText
</h4>
<pre>public
<a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.TextBounds.html" title="class in com.badlogic.gdx.graphics.g2d">BitmapFont.TextBounds
</a> addWrappedText(java.lang.CharSequence
str,
float
x,
float
y,
float
wrapWidth)
</pre>
<div class="block">Adds glyphs for the specified text, which may contain newlines (\n) and is automatically wrapped within the specified width.
</div>
<dl><dt><span class="strong">See Also:
</span></dt><dd><code>#addWrappedText(CharSequence, float, float, float, HAlignment)
</code></dd></dl>
</li>
</ul>
<a name="addWrappedText(java.lang.CharSequence, float, float, float, com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addWrappedText
</h4>
<pre>public
<a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.TextBounds.html" title="class in com.badlogic.gdx.graphics.g2d">BitmapFont.TextBounds
</a> addWrappedText(java.lang.CharSequence
str,
float
x,
float
y,
float
wrapWidth,
<a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.HAlignment.html" title="enum in com.badlogic.gdx.graphics.g2d">BitmapFont.HAlignment
</a> alignment)
</pre>
<div class="block">Adds glyphs for the specified text, which may contain newlines (\n) and is automatically wrapped within the specified width.
</div>
<dl><dt><span class="strong">Parameters:
</span></dt><dd><code>x
</code> - The x position for the left most character.
</dd><dd><code>y
</code> - The y position for the top of most capital letters in the font (the
<a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.html#getCapHeight()"><code>cap height
</code></a>).
</dd><dd><code>alignment
</code> - The horizontal alignment of wrapped line.
</dd>
<dt><span class="strong">Returns:
</span></dt><dd>The bounds of the cached string (the height is the distance from y to the baseline of the last line).
</dd></dl>
</li>
</ul>
<a name="getBounds()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBounds
</h4>
<pre>public
<a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.TextBounds.html" title="class in com.badlogic.gdx.graphics.g2d">BitmapFont.TextBounds
</a> getBounds()
</pre>
<div class="block">Returns the size of the cached string. The height is the distance from the top of most capital letters in the font (the
<a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.html#getCapHeight()"><code>cap height
</code></a>) to the baseline of the last line of text.
</div>
</li>
</ul>
<a name="getX()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getX
</h4>
<pre>public
float
getX()
</pre>
<div class="block">Returns the x position of the cached string, relative to the position when the string was cached.
</div>
</li>
</ul>
<a name="getY()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getY
</h4>
<pre>public
float
getY()
</pre>
<div class="block">Returns the y position of the cached string, relative to the position when the string was cached.
</div>
</li>
</ul>
<a name="getFont()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFont
</h4>
<pre>public
<a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.html" title="class in com.badlogic.gdx.graphics.g2d">BitmapFont
</a> getFont()
</pre>
</li>
</ul>
<a name="setUseIntegerPositions(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setUseIntegerPositions
</h4>
<pre>public
void
setUseIntegerPositions(boolean
use)
</pre>
<div class="block">Specifies whether to use integer positions or not. Default is to use them so filtering doesn't kick in as badly.
</div>
<dl><dt><span class="strong">Parameters:
</span></dt><dd><code>use
</code> -
</dd></dl>
</li>
</ul>
<a name="usesIntegerPositions()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>usesIntegerPositions
</h4>
<pre>public
boolean
usesIntegerPositions()
</pre>
<dl><dt><span class="strong">Returns:
</span></dt><dd>whether this font uses integer positions for drawing.
</dd></dl>
</li>
</ul>
<a name="getVertices()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getVertices
</h4>
<pre>public
float[]
getVertices()
</pre>
</li>
</ul>
<a name="getVertices(int)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getVertices
</h4>
<pre>public
float[]
getVertices(int
page)
</pre>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview
</a></li>
<li><a href="package-summary.html">Package
</a></li>
<li class="navBarCell1Rev">Class
</li>
<li><a href="class-use/BitmapFontCache.html">Use
</a></li>
<li><a href="package-tree.html">Tree
</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated
</a></li>
<li><a href="../../../../../index-all.html">Index
</a></li>
<li><a href="../../../../../help-doc.html">Help
</a></li>
</ul>
<div class="aboutLanguage"><em>libgdx API
</em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../com/badlogic/gdx/graphics/g2d/BitmapFont.TextBounds.html" title="class in com.badlogic.gdx.graphics.g2d"><span class="strong">Prev Class
</span></a></li>
<li><a href="../../../../../com/badlogic/gdx/graphics/g2d/Gdx2DPixmap.html" title="class in com.badlogic.gdx.graphics.g2d"><span class="strong">Next Class
</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?com/badlogic/gdx/graphics/g2d/BitmapFontCache.html" target="_top">Frames
</a></li>
<li><a href="BitmapFontCache.html" target="_top">No Frames
</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes
</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:
</li>
<li>Nested
|
</li>
<li>Field
|
</li>
<li><a href="#constructor_summary">Constr
</a> |
</li>
<li><a href="#method_summary">Method
</a></li>
</ul>
<ul class="subNavList">
<li>Detail:
</li>
<li>Field
|
</li>
<li><a href="#constructor_detail">Constr
</a> |
</li>
<li><a href="#method_detail">Method
</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>
<div style="font-size:9pt"><i>
Copyright
© 2010-2013 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)
</i></div>
</small></p>
</body>
</html>