|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectrita.RiObject
rita.RiPageLayout
public class RiPageLayout
Note: still under-development, use w' care...
| Field Summary | |
|---|---|
static boolean |
DEFAULT_INDENT_FIRST_PARAGRAPH
whether to add an indent to first paragraph for a page layout (default true) |
static float |
DEFAULT_LEADING
amount of lead to use between lines (default is twice the font-height) |
static int |
DEFAULT_PARAGRAPH_INDENT
# of (space-width) characters to use as a paragraph indent (default=0) |
static float |
DEFAULT_PARAGRAPH_SPACING
amount of additional lead to add between paragraphs (default is 0) |
| Fields inherited from interface processing.core.PConstants |
|---|
A, AB, ADD, AG, ALPHA, ALPHA_MASK, ALT, AMBIENT, AR, ARC, ARGB, ARROW, B, BACKSPACE, BASELINE, BEEN_LIT, BEVEL, BLEND, BLUE_MASK, BLUR, BOTTOM, BOX, BURN, CENTER, CENTER_DIAMETER, CENTER_RADIUS, CHATTER, CLOSE, CMYK, CODED, COMPLAINT, CONTROL, CORNER, CORNERS, CROSS, CUSTOM, DA, DARKEST, DB, DEG_TO_RAD, DELETE, DG, DIAMETER, DIFFERENCE, DILATE, DIRECTIONAL, DISABLE_ACCURATE_TEXTURES, DISABLE_DEPTH_SORT, DISABLE_DEPTH_TEST, DISABLE_OPENGL_2X_SMOOTH, DISABLE_OPENGL_ERROR_REPORT, DODGE, DOWN, DR, DXF, EB, EDGE, EG, ELLIPSE, ENABLE_ACCURATE_TEXTURES, ENABLE_DEPTH_SORT, ENABLE_DEPTH_TEST, ENABLE_NATIVE_FONTS, ENABLE_OPENGL_2X_SMOOTH, ENABLE_OPENGL_4X_SMOOTH, ENABLE_OPENGL_ERROR_REPORT, ENTER, EPSILON, ER, ERODE, ERROR_BACKGROUND_IMAGE_FORMAT, ERROR_BACKGROUND_IMAGE_SIZE, ERROR_PUSHMATRIX_OVERFLOW, ERROR_PUSHMATRIX_UNDERFLOW, ERROR_TEXTFONT_NULL_PFONT, ESC, EXCLUSION, G, GIF, GRAY, GREEN_MASK, HALF_PI, HAND, HARD_LIGHT, HINT_COUNT, HSB, IMAGE, INVERT, JAVA2D, JPEG, LEFT, LIGHTEST, LINE, LINES, LINUX, MACOSX, MAX_FLOAT, MAX_INT, MIN_FLOAT, MIN_INT, MITER, MODEL, MULTIPLY, NORMAL, NORMALIZED, NX, NY, NZ, OPAQUE, OPEN, OPENGL, ORTHOGRAPHIC, OTHER, OVERLAY, P2D, P3D, PATH, PDF, PERSPECTIVE, PI, platformNames, POINT, POINTS, POLYGON, POSTERIZE, PROBLEM, PROJECT, QUAD, QUAD_STRIP, QUADS, QUARTER_PI, R, RAD_TO_DEG, RADIUS, RECT, RED_MASK, REPLACE, RETURN, RGB, RIGHT, ROUND, SA, SB, SCREEN, SG, SHAPE, SHIFT, SHINE, SOFT_LIGHT, SPB, SPG, SPHERE, SPOT, SPR, SQUARE, SR, SUBTRACT, SW, TAB, TARGA, THIRD_PI, THRESHOLD, TIFF, TOP, TRIANGLE, TRIANGLE_FAN, TRIANGLE_STRIP, TRIANGLES, TWO_PI, TX, TY, TZ, U, UP, V, VERTEX_FIELD_COUNT, VW, VX, VY, VZ, WAIT, WHITESPACE, WINDOWS, X, Y, Z |
| Constructor Summary | |
|---|---|
RiPageLayout(processing.core.PApplet pApplet,
int leftMargin,
int topMargin,
int rightMargin,
int bottomMargin)
|
|
RiPageLayout(processing.core.PApplet pApplet,
int leftMargin,
int topMargin,
int rightMargin,
int bottomMargin,
int pageWidth,
int pageHeight)
|
|
RiPageLayout(processing.core.PApplet pApplet,
java.awt.Rectangle rect,
int pageWidth,
int pageHeight)
|
|
| Method Summary | |
|---|---|
RiPageLayout |
copy()
|
void |
delete()
|
void |
drawGuides()
|
void |
drawGuides(processing.core.PGraphics p)
|
int |
getBottomMargin()
|
RiText |
getFooter()
|
RiText |
getHeader()
|
int |
getIndentSize()
|
float |
getLeading()
Returns the current leading, or -1 if using the defaults |
int |
getLeftMargin()
|
RiText[] |
getLines()
|
int |
getPageHeight()
|
int |
getPageNo()
|
int |
getPageWidth()
|
java.lang.String |
getRemainingText()
|
int |
getRightMargin()
|
java.awt.Rectangle |
getTextRectangle()
|
float |
getTextX()
|
float |
getTextY()
|
int |
getTopMargin()
|
RiText[] |
getWords()
|
int |
layout(processing.core.PFont pf,
java.lang.String text)
Creates an array of RiText, one per line from the input text and lays it out on the page. |
int |
layout(java.lang.String text)
Creates an array of RiText, one per line from the input text and lays it out on the page. |
void |
layoutFromFile(processing.core.PFont pf,
java.lang.String fileName)
Creates an array of RiText, one per line from the text loaded from the specified 'fileName', and lays it out on the page according to the specified font. |
static void |
main(java.lang.String[] args)
|
void |
setFooter(RiText footer)
|
void |
setFooter(java.lang.String footerText)
|
void |
setHeader(RiText header)
|
void |
setHeader(java.lang.String headerText)
|
void |
setIndentFirstParagraph(boolean indentFirstParagraph)
Whether to add an indent before the first paragraph |
void |
setIndents(int indents)
|
void |
setIndentSize(int indentSize)
|
void |
setLeading(float leading)
Sets the leading. |
void |
setLines(RiText[] lines)
|
void |
setPageHeight(int pageHeight)
|
void |
setPageNo(int pageNumber)
|
void |
setPageWidth(int pageWidth)
|
void |
setParagraphSpacing(float lead)
Sets the amount of additional lead to add between paragraphs |
void |
setTextColor(float[] color)
|
void |
showPageNumbers(boolean showPageNumbers)
|
java.lang.String |
toString()
|
| Methods inherited from class rita.RiObject |
|---|
dispose, getId, getPApplet, nextId |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static float DEFAULT_LEADING
public static int DEFAULT_PARAGRAPH_INDENT
public static float DEFAULT_PARAGRAPH_SPACING
public static boolean DEFAULT_INDENT_FIRST_PARAGRAPH
| Constructor Detail |
|---|
public RiPageLayout(processing.core.PApplet pApplet,
int leftMargin,
int topMargin,
int rightMargin,
int bottomMargin)
public RiPageLayout(processing.core.PApplet pApplet,
int leftMargin,
int topMargin,
int rightMargin,
int bottomMargin,
int pageWidth,
int pageHeight)
public RiPageLayout(processing.core.PApplet pApplet,
java.awt.Rectangle rect,
int pageWidth,
int pageHeight)
| Method Detail |
|---|
public void layoutFromFile(processing.core.PFont pf,
java.lang.String fileName)
public int layout(java.lang.String text)
public int layout(processing.core.PFont pf,
java.lang.String text)
public RiPageLayout copy()
public void delete()
public void drawGuides()
public void drawGuides(processing.core.PGraphics p)
public int getTopMargin()
public int getLeftMargin()
public int getRightMargin()
public int getBottomMargin()
public java.awt.Rectangle getTextRectangle()
public float getTextX()
public float getTextY()
public int getPageWidth()
public void setPageWidth(int pageWidth)
public int getPageHeight()
public void setPageHeight(int pageHeight)
public RiText getHeader()
public void setHeader(RiText header)
public void setHeader(java.lang.String headerText)
public RiText getFooter()
public void setFooter(RiText footer)
public void showPageNumbers(boolean showPageNumbers)
public void setFooter(java.lang.String footerText)
public void setPageNo(int pageNumber)
public int getPageNo()
public void setLines(RiText[] lines)
public RiText[] getLines()
public RiText[] getWords()
public void setIndentSize(int indentSize)
public int getIndentSize()
public java.lang.String getRemainingText()
public float getLeading()
public void setLeading(float leading)
public void setIndents(int indents)
public void setParagraphSpacing(float lead)
public void setIndentFirstParagraph(boolean indentFirstParagraph)
public java.lang.String toString()
toString in class java.lang.Objectpublic void setTextColor(float[] color)
public static void main(java.lang.String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||