public class EPSLowLevel
extends java.lang.Object
As always, this class is a very thin veneer on the EPS format itself. That is, it doesn't play fancy tricks. We did think about avoiding path duplications in some cases (for instance a fill and then a stroke are made), but
Note for future programming: Including Truetype fonts in EPSF documents works fairly well. The font should be defined in the header as:
%%DocumentNeededResources: font EgyptoSerif %%IncludeResource: font EgyptoSerifThen, access to the glyphs is possible, either with the show command, or, for those glyphs which have no encoding, with the glyphshow command. Examples:
/EgyptoSerif findfont 40 scalefont setfont /infinity glyphshow : displays ∞ /uniA722 glyphshow : displays the egyptological aleph /uniEC40 glyphshow : in EgyptoSerif, used for H + macron.It would probably be safer to restrict this to glyphs in private areas, as uniA722 is likely to be dropped as name for the Aleph glyph !
| Constructor and Description |
|---|
EPSLowLevel(java.io.Writer writer,
java.awt.geom.Dimension2D dimensions) |
EPSLowLevel(java.io.Writer writer,
java.awt.geom.Dimension2D dimensions,
java.lang.String comment) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
closePath() |
void |
cubicTo(double x1,
double y1,
double x2,
double y2,
double x,
double y) |
void |
drawLine(double x,
double y,
double x2,
double y2) |
void |
fillPath() |
void |
grestore() |
void |
gsave() |
void |
lineTo(double x,
double y) |
void |
moveTo(double x,
double y) |
void |
quadTo(double x1,
double y1,
double x,
double y) |
void |
setColor(EPSColor color) |
void |
setColor(int red,
int green,
int blue)
Sets the color to CMYK, using very basic conversion.
|
void |
startPath() |
void |
strokePath() |
public EPSLowLevel(java.io.Writer writer,
java.awt.geom.Dimension2D dimensions)
throws EPSOutException
EPSOutExceptionpublic EPSLowLevel(java.io.Writer writer,
java.awt.geom.Dimension2D dimensions,
java.lang.String comment)
throws EPSOutException
EPSOutExceptionpublic void drawLine(double x,
double y,
double x2,
double y2)
throws EPSOutException
EPSOutExceptionpublic void startPath()
throws EPSOutException
EPSOutExceptionpublic void cubicTo(double x1,
double y1,
double x2,
double y2,
double x,
double y)
throws EPSOutException
EPSOutExceptionpublic void moveTo(double x,
double y)
throws EPSOutException
EPSOutExceptionpublic void lineTo(double x,
double y)
throws EPSOutException
EPSOutExceptionpublic void quadTo(double x1,
double y1,
double x,
double y)
throws EPSOutException
EPSOutExceptionpublic void strokePath()
throws EPSOutException
EPSOutExceptionpublic void fillPath()
throws EPSOutException
EPSOutExceptionpublic void close()
throws EPSOutException
EPSOutExceptionpublic void closePath()
throws EPSOutException
EPSOutExceptionpublic void setColor(int red,
int green,
int blue)
throws EPSOutException
red - green - blue - EPSOutExceptionpublic void setColor(EPSColor color) throws EPSOutException
EPSOutExceptionpublic void gsave()
public void grestore()