APIdia Launch Partner
Top Description Fields Constructors Methods
com.badlogic.gdx.tools.hiero.unicodefont.effects

public Class OutlineEffect

extends Object
implements ConfigurableEffect
Class Inheritance
All Implemented Interfaces
com.badlogic.gdx.tools.hiero.unicodefont.effects.ConfigurableEffect, com.badlogic.gdx.tools.hiero.unicodefont.effects.Effect
Known Direct Subclasses
com.badlogic.gdx.tools.hiero.unicodefont.effects.OutlineWobbleEffect, com.badlogic.gdx.tools.hiero.unicodefont.effects.OutlineZigzagEffect
Imports
java.awt.BasicStroke, .Color, .Graphics2D, .Stroke, java.awt.image.BufferedImage, java.util.ArrayList, .Iterator, .List, com.badlogic.gdx.tools.hiero.unicodefont.Glyph, .UnicodeFont

Strokes glyphs with an outline.
Author
Nathan Sweet

Field Summary

Modifier and TypeField and Description
private Color
private int
private Stroke
private float

Constructor Summary

AccessConstructor and Description
public
public
OutlineEffect(int width, Color color)

Method Summary

Modifier and TypeMethod and Description
public void
draw(BufferedImage image, Graphics2D g, UnicodeFont unicodeFont, Glyph glyph)

Implements com.badlogic.gdx.tools.hiero.unicodefont.effects.Effect.draw.

Called to draw the effect.

public Color
public int
public Stroke
public List<E>
public float
public void
setColor(Color color)

public void
setJoin(int join)

Sets how the corners of the outline are drawn.

public void
setStroke(Stroke stroke)

Sets the stroke to use for the outline.

public void
public void
setWidth(int width)

Sets the width of the outline.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

colorback to summary
private Color color
joinback to summary
private int join
strokeback to summary
private Stroke stroke
widthback to summary
private float width

Constructor Detail

OutlineEffectback to summary
public OutlineEffect()
OutlineEffectback to summary
public OutlineEffect(int width, Color color)

Method Detail

drawback to summary
public void draw(BufferedImage image, Graphics2D g, UnicodeFont unicodeFont, Glyph glyph)

Implements com.badlogic.gdx.tools.hiero.unicodefont.effects.Effect.draw.

Doc from com.badlogic.gdx.tools.hiero.unicodefont.effects.Effect.draw.

Called to draw the effect.

getColorback to summary
public Color getColor()
getJoinback to summary
public int getJoin()
getStrokeback to summary
public Stroke getStroke()
getValuesback to summary
public List<E> getValues()

Implements com.badlogic.gdx.tools.hiero.unicodefont.effects.ConfigurableEffect.getValues.

Doc from com.badlogic.gdx.tools.hiero.unicodefont.effects.ConfigurableEffect.getValues.

Returns the list of Values for this effect. This list is not typically backed by the effect, so changes to the values will not take affect until setValues(List) is called.

getWidthback to summary
public float getWidth()
setColorback to summary
public void setColor(Color color)
setJoinback to summary
public void setJoin(int join)

Sets how the corners of the outline are drawn. This is usually only noticeable at large outline widths.

Parameters
join:int

One of: BasicStroke#JOIN_BEVEL, BasicStroke#JOIN_MITER, BasicStroke#JOIN_ROUND

setStrokeback to summary
public void setStroke(Stroke stroke)

Sets the stroke to use for the outline. If this is set, the other outline settings are ignored.

setValuesback to summary
public void setValues(List<E> values)

Implements com.badlogic.gdx.tools.hiero.unicodefont.effects.ConfigurableEffect.setValues.

Doc from com.badlogic.gdx.tools.hiero.unicodefont.effects.ConfigurableEffect.setValues.

Sets the list of Values for this effect.

setWidthback to summary
public void setWidth(int width)

Sets the width of the outline. The glyphs will need padding so the outline doesn't get clipped.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.