|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ttools.plot.GraphicExporter
uk.ac.starlink.ttools.plot.PdfGraphicExporter
public abstract class PdfGraphicExporter
GraphicExporter implementation that exports to PDF format. The best way to turn fonts are turned into graphics in PDFs is not obvious, so this class parameterises the options. Static members provide ways of getting useful instances.
Field Summary | |
---|---|
static PdfGraphicExporter |
BASIC
Exporter which uses the default font mapper. |
static PdfGraphicExporter |
GLYPH_TEXT
Exporter which writes text as shapes not using fonts. |
Fields inherited from class uk.ac.starlink.ttools.plot.GraphicExporter |
---|
EPS, EPS_GZIP, GIF, JPEG, PNG, PNG_TRANSPARENT |
Constructor Summary | |
---|---|
protected |
PdfGraphicExporter()
Constructor. |
Method Summary | |
---|---|
static PdfGraphicExporter |
createExternalFontExporter(URL fontsUrl)
Returns an exporter which uses externally stored fonts. |
abstract Graphics2D |
createGraphics(com.lowagie.text.pdf.PdfContentByte pcb,
int width,
int height)
Returns a graphics context which can be used to write to a given PDF content object. |
void |
exportGraphic(Picture picture,
OutputStream out)
Paints the given picture to an output stream using some graphics format or other. |
Methods inherited from class uk.ac.starlink.ttools.plot.GraphicExporter |
---|
getContentEncoding, getDescription, getFileSuffixes, getKnownExporters, getMimeType, getName, toPicture, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static PdfGraphicExporter BASIC
public static PdfGraphicExporter GLYPH_TEXT
Constructor Detail |
---|
protected PdfGraphicExporter()
Method Detail |
---|
public static PdfGraphicExporter createExternalFontExporter(URL fontsUrl)
GLYPH_TEXT
.
fontsUrl
- location of a text file of font resource strings
(typically file names or URLs of .ttf files)
public void exportGraphic(Picture picture, OutputStream out) throws IOException
GraphicExporter
exportGraphic
in class GraphicExporter
picture
- picture to drawout
- destination output stream
IOException
public abstract Graphics2D createGraphics(com.lowagie.text.pdf.PdfContentByte pcb, int width, int height)
pcb
- PDF content objectwidth
- in pixelsheight
- in pixels
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |