|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.stanford.hci.r3.render.SheetRenderer
public class SheetRenderer
This class will render a Sheet into a JPEG, PDF, or Java2D graphics context.
For individual regions, it will use specific region renderers (e.g., ImageRenderer, PolygonRenderer, and TextRenderer).
This software is distributed under the BSD License.
Field Summary | |
---|---|
protected boolean |
renderActiveRegionsWithPattern
By default, any active regions will be overlaid with pattern (unique to at least this sheet, unless otherwise specified). |
protected Sheet |
sheet
The sheet we are to render. |
Constructor Summary | |
---|---|
SheetRenderer(Sheet s)
Create a new TiledPatternGenerator for this Sheet. |
|
SheetRenderer(Sheet s,
TiledPatternGenerator patternGenerator)
Feel free to share TiledPatternGenerator between Sheets. |
Method Summary | |
---|---|
PatternLocationToSheetLocationMapping |
getPatternInformation()
|
void |
renderToG2D(java.awt.Graphics2D g2d)
We assume the g2d is big enough for us to draw this Sheet to. |
void |
renderToJPEG(java.io.File file)
Use the default pixels per inch. |
void |
renderToJPEG(java.io.File destJPEGFile,
Pixels destUnits)
|
void |
renderToPDF(java.io.File destPDFFile)
Uses the iText package to render a PDF file from scratch. |
protected void |
renderToPDFContentLayers(java.io.File destPDFFile,
PdfContentByte topLayer,
PdfContentByte bottomLayer)
|
void |
savePatternInformation()
This saves an xml file with the same name/path, but different extension as the most-recently rendered PDF file. |
void |
savePatternInformation(java.io.File patternInfoFile)
After Rendering Pattern, we now know the particulars of the pattern coordinates for each region. |
void |
setPatternColor(java.awt.Color pColor)
|
void |
setPatternGenerator(TiledPatternGenerator tiledPatternGenerator)
Useful for when rendering many sheets at a time. |
void |
setRenderActiveRegionsWithPattern(boolean activeWithPattern)
|
void |
useLargerPatternDots()
|
void |
useSmallerPatternDots()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean renderActiveRegionsWithPattern
protected Sheet sheet
Constructor Detail |
---|
public SheetRenderer(Sheet s)
s
- public SheetRenderer(Sheet s, TiledPatternGenerator patternGenerator)
s
- patternGenerator
- Method Detail |
---|
public PatternLocationToSheetLocationMapping getPatternInformation()
public void renderToG2D(java.awt.Graphics2D g2d)
g2d
- public void renderToJPEG(java.io.File file)
file
- public void renderToJPEG(java.io.File destJPEGFile, Pixels destUnits)
destJPEGFile
- destUnits
- Converts the graphics2D object into a new coordinate space based on the destination units'
pixels per inch. This is for the purposes of rendering the document to screen, where
Graphics2D's default 72ppi isn't always the right way to do it.public void renderToPDF(java.io.File destPDFFile)
destPDFFile
- protected void renderToPDFContentLayers(java.io.File destPDFFile, PdfContentByte topLayer, PdfContentByte bottomLayer)
destPDFFile
- topLayer
- bottomLayer
- public void savePatternInformation()
public void savePatternInformation(java.io.File patternInfoFile)
patternInfoFile
- public void setPatternColor(java.awt.Color pColor)
pColor
- public void setPatternGenerator(TiledPatternGenerator tiledPatternGenerator)
tiledPatternGenerator
- public void setRenderActiveRegionsWithPattern(boolean activeWithPattern)
activeWithPattern
- public void useLargerPatternDots()
public void useSmallerPatternDots()
|
Copyright 2006 Stanford University | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |