An example of the use of such a font is included in the libgdx test suite under the name BitmapFontDistanceFieldTest.
DistanceFieldGenerator
| Modifier and Type | Field and Description |
|---|---|
| private Color | |
| private int | |
| private float |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | draw(BufferedImage image, Graphics2D g, UnicodeFont unicodeFont, Glyph glyph)
Implements com. Called to draw the effect. |
| private void | drawGlyph(BufferedImage
the image to draw to image, Glyph the glyph to draw glyph)Draws the glyph to the given image, upscaled by a factor of |
| public List | getValues()
Implements com. Returns the list of |
| public void | setValues(List<E> values)
Implements com. Sets the list of |
| public String |
| color | back to summary |
|---|---|
| private Color color | |
| scale | back to summary |
|---|---|
| private int scale | |
| spread | back to summary |
|---|---|
| private float spread | |
| DistanceFieldEffect | back to summary |
|---|---|
| public DistanceFieldEffect() | |
| draw | back to summary |
|---|---|
| public void draw(BufferedImage image, Graphics2D g, UnicodeFont unicodeFont, Glyph glyph) Implements com. Doc from com. Called to draw the effect.
| |
| drawGlyph | back to summary |
|---|---|
| private void drawGlyph(BufferedImage image, Glyph glyph) Draws the glyph to the given image, upscaled by a factor of
| |
| getValues | back to summary |
|---|---|
| public List Implements com. Doc from com. Returns the list of
| |
| setValues | back to summary |
|---|---|
| public void setValues(List<E> values) Implements com. Doc from com. Sets the list of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |