|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.nexttext.behaviour.AbstractAction net.nexttext.behaviour.dform.DForm net.nexttext.behaviour.dform.Reform
public class Reform
A DForm which reverts TextObject to its original shape.
Different ways of reforming the glyphs are provided, which given different visual effects.
The current ActionResult returned specifies that a Reform action never terminates, it sends a true event once it's reformed. We probably want to change it so that it can terminate. If needs be, the Reform could be put into a Repeat behaviour.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface net.nexttext.behaviour.Action |
---|
Action.ActionResult |
Field Summary | |
---|---|
static int |
STYLE_EXPONENTIAL
|
static int |
STYLE_LINEAR
|
Constructor Summary | |
---|---|
Reform()
Constructs a default Reform of linear style with a default speed of 0.05. |
|
Reform(float speed,
int style)
Constructs a custom Reform with given style and appropriate speed. |
Method Summary | |
---|---|
Action.ActionResult |
behave(TextObjectGlyph to)
DForms generally just make sense on TextObjectGlyphs. |
float |
getExponentialSpeed()
|
float |
getLinearSpeed()
|
void |
setExponentialSpeed(float exponentialSpeed)
Sets the speed of the reform when using the exponential style. |
void |
setLinearSpeed(float linearSpeed)
Sets the speed of the reform when using the linear style. |
void |
setStyleExponential()
Exponential style reformation preserves deformations longer. |
void |
setStyleLinear()
Linear style of reformation doesn't deform glyph shape. |
Methods inherited from class net.nexttext.behaviour.dform.DForm |
---|
behave, getControlPoints |
Methods inherited from class net.nexttext.behaviour.AbstractAction |
---|
behave, behave, complete, getDisplayName, getRequiredProperties, makeBehaviour, properties, setDisplayName |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int STYLE_LINEAR
public static final int STYLE_EXPONENTIAL
Constructor Detail |
---|
public Reform()
public Reform(float speed, int style)
In exponential style, smaller values give faster reforms, the default value is 2000.
In linear style, smaller values give slower reforms, the default value is 0.05
.
speed
- the speed value according to the chosen stylestyle
- the type of reformation (linear or exponential)Method Detail |
---|
public Action.ActionResult behave(TextObjectGlyph to)
DForm
behave
in class DForm
public float getExponentialSpeed()
public void setExponentialSpeed(float exponentialSpeed)
exponentialSpeed
- an appropriate speed for exponential stylepublic float getLinearSpeed()
public void setLinearSpeed(float linearSpeed)
linearSpeed
- an appropriate speed for linear stylepublic void setStyleLinear()
public void setStyleExponential()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |