public class GTitle extends java.lang.Object implements PConstants
ADD, ALPHA, ALT, AMBIENT, ARC, ARGB, ARROW, BACKSPACE, BASELINE, BEVEL, BEZIER_VERTEX, BLEND, BLUR, BOTTOM, BOX, BREAK, BURN, CENTER, CHATTER, CHORD, CLAMP, CLOSE, CODED, COMPLAINT, CONTROL, CORNER, CORNERS, CROSS, CURVE_VERTEX, CUSTOM, DARKEST, DEG_TO_RAD, DELETE, DIAMETER, DIFFERENCE, DILATE, DIRECTIONAL, DISABLE_ASYNC_SAVEFRAME, DISABLE_BUFFER_READING, DISABLE_DEPTH_MASK, DISABLE_DEPTH_SORT, DISABLE_DEPTH_TEST, DISABLE_KEY_REPEAT, DISABLE_NATIVE_FONTS, DISABLE_OPENGL_ERRORS, DISABLE_OPTIMIZED_STROKE, DISABLE_STROKE_PERSPECTIVE, DISABLE_STROKE_PURE, DISABLE_TEXTURE_MIPMAPS, DODGE, DOWN, DXF, ELLIPSE, ENABLE_ASYNC_SAVEFRAME, ENABLE_BUFFER_READING, ENABLE_DEPTH_MASK, ENABLE_DEPTH_SORT, ENABLE_DEPTH_TEST, ENABLE_KEY_REPEAT, ENABLE_NATIVE_FONTS, ENABLE_OPENGL_ERRORS, ENABLE_OPTIMIZED_STROKE, ENABLE_STROKE_PERSPECTIVE, ENABLE_STROKE_PURE, ENABLE_TEXTURE_MIPMAPS, ENTER, EPSILON, ERODE, ESC, EXCLUSION, FX2D, GIF, GRAY, GROUP, HALF_PI, HAND, HARD_LIGHT, HINT_COUNT, HSB, IMAGE, INVERT, JAVA2D, JPEG, LANDSCAPE, LEFT, LIGHTEST, LINE, LINE_LOOP, LINE_STRIP, LINES, LINUX, MACOSX, MAX_FLOAT, MAX_INT, MIN_FLOAT, MIN_INT, MITER, MODEL, MODELVIEW, MOVE, MULTIPLY, NORMAL, OPAQUE, OPEN, OPENGL, ORTHOGRAPHIC, OTHER, OVERLAY, P2D, P3D, PATH, PDF, PERSPECTIVE, PI, PIE, platformNames, POINT, POINTS, POLYGON, PORTRAIT, POSTERIZE, PROBLEM, PROJECT, PROJECTION, QUAD, QUAD_BEZIER_VERTEX, QUAD_STRIP, QUADRATIC_VERTEX, QUADS, QUARTER_PI, RAD_TO_DEG, RADIUS, RECT, REPEAT, REPLACE, RETURN, RGB, RIGHT, ROUND, SCREEN, SHAPE, SHIFT, SOFT_LIGHT, SPAN, SPHERE, SPOT, SQUARE, SUBTRACT, SVG, TAB, TARGA, TAU, TEXT, THIRD_PI, THRESHOLD, TIFF, TOP, TRIANGLE, TRIANGLE_FAN, TRIANGLE_STRIP, TRIANGLES, TWO_PI, UP, VERTEX, WAIT, WHITESPACE, WINDOWS, X, Y, Z
Constructor and Description |
---|
GTitle(PApplet parent,
float[] dim)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
draw()
Draws the plot title
|
void |
setDim(float[] newDim)
Sets the plot box dimensions information
|
void |
setDim(float xDim,
float yDim)
Sets the plot box dimensions information
|
void |
setFontColor(int newFontColor)
Sets the font color
|
void |
setFontName(java.lang.String newFontName)
Sets the font name
|
void |
setFontProperties(java.lang.String newFontName,
int newFontColor,
int newFontSize)
Sets all the font properties at once
|
void |
setFontSize(int newFontSize)
Sets the font size
|
void |
setOffset(float newOffset)
Sets the title offset
|
void |
setRelativePos(float newRelativePos)
Sets the title relative position in the plot
|
void |
setText(java.lang.String newText)
Sets the title text
|
void |
setTextAlignment(int newTextAlignment)
Sets the title type of text alignment
|
public GTitle(PApplet parent, float[] dim)
parent
- the parent Processing appletdim
- the plot box dimensions in pixelspublic void draw()
public void setDim(float xDim, float yDim)
xDim
- the new plot box x dimensionyDim
- the new plot box y dimensionpublic void setDim(float[] newDim)
newDim
- the new plot box dimensions informationpublic void setRelativePos(float newRelativePos)
newRelativePos
- the new relative position in the plotpublic void setOffset(float newOffset)
newOffset
- the new title offsetpublic void setText(java.lang.String newText)
newText
- the new title textpublic void setTextAlignment(int newTextAlignment)
newTextAlignment
- the new type of text alignmentpublic void setFontName(java.lang.String newFontName)
newFontName
- the name of the new fontpublic void setFontColor(int newFontColor)
newFontColor
- the new font colorpublic void setFontSize(int newFontSize)
newFontSize
- the new font sizepublic void setFontProperties(java.lang.String newFontName, int newFontColor, int newFontSize)
newFontName
- the name of the new fontnewFontColor
- the new font colornewFontSize
- the new font sizeProcessing Library grafica by Javier Gracia Carpio. (c) 2015