public class WrappedToken
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.awt.Rectangle |
bounds
Bounding rectangle of the token.
|
java.lang.String |
id
ID of the text token.
|
java.lang.String |
text
Text token to wrap
|
float |
x
x-position of the token.
|
float |
y
y-position of the token.
|
Constructor and Description |
---|
WrappedToken() |
Modifier and Type | Method and Description |
---|---|
java.awt.Rectangle |
getBounds(processing.core.PApplet sketch)
Returns a rectangle describing the screen bounds of this token (if drawn correctly)
Corrects for the different textAlign modes of the sketch.
|
java.awt.Rectangle |
getBounds(processing.core.PGraphics pGraphics)
Returns a rectangle describing the screen bounds of this token (if drawn correctly)
Corrects for the different textAlign modes of the pGraphics.
|
java.lang.String |
toString() |
public java.lang.String text
public java.lang.String id
public float x
public float y
public java.awt.Rectangle bounds
public java.lang.String toString()
toString
in class java.lang.Object
public java.awt.Rectangle getBounds(processing.core.PApplet sketch)
sketch
- Sketch doing the drawing.public java.awt.Rectangle getBounds(processing.core.PGraphics pGraphics)
pGraphics
- The graphics context within which the text drawing takes place.