|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.rosuda.pograss.PoGraSS
public class PoGraSS
Portable Graphics SubSystem - first draft of the abstract interface definition.
May change (or be extended) in the future.
0.90: initial release
0.91: (CVS 1.1) addComment, setTitle
0.92: (CVS 1.2) support for layers (nextLayer)
0.93: (CVS 1.3) support for version information (in the API; versionString, version and passVersionInfo)
0.94: (CVS 1.5) support for extended drawString and font handling
0.95: (CVS 1.6) support for polygons
0.96: (CVS 1.7) support for separate fill/pen colors and regular commands (rect, oval,...)
backwards compatibility is provided by the jointColors
flag.
b added setColor(Color) for compatibility with Graphics
0.97: (1.12) added nextObject(...) - allows creation of structures in the plot
1.13 switched font size from int to double; added font defaults
Field Summary | |
---|---|
static int |
FA_Bold
|
static int |
FA_Ital
|
static int |
FA_MASK_Type
|
static int |
FA_Normal
|
static int |
FF_Mono
|
static int |
FF_SansSerif
|
static int |
FF_Serif
|
int |
localLayerCache
this variable is used only by PoGraSS implementations which support layer caching. |
static int |
TA_Center
|
static int |
TA_Left
|
static int |
TA_MASK_Or
|
static int |
TA_Right
|
int |
version
|
java.lang.String |
versionString
|
Constructor Summary | |
---|---|
PoGraSS()
|
Method Summary | |
---|---|
void |
addComment(java.lang.String c)
|
void |
begin()
|
void |
beginAlphaBlock()
|
void |
defineColor(java.lang.String nam,
float r,
float g,
float b,
float a)
|
void |
defineColor(java.lang.String nam,
int R,
int G,
int B)
|
void |
drawArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
|
void |
drawImage(PoGraSSimage img,
int x1,
int y1,
int x2,
int y2)
|
void |
drawLine(int x1,
int y1,
int x2,
int y2)
|
void |
drawOval(int x,
int y,
int rx,
int ry)
|
void |
drawPolygon(int[] x,
int[] y,
int pts)
|
void |
drawPolygon(int[] x,
int[] y,
int pts,
boolean closed)
|
void |
drawPolyline(int[] x,
int[] y,
int pts)
|
void |
drawRect(int x1,
int y1,
int w,
int h)
|
void |
drawRoundRect(int x1,
int y1,
int x2,
int y2,
int dx,
int dy)
|
void |
drawString(java.lang.String txt,
int x,
int y)
|
void |
drawString(java.lang.String txt,
int x,
int y,
double ax,
double ay)
draw string with anchor point x,y where ax and ay translate the anchor relative to text extension. |
void |
drawString(java.lang.String txt,
int x,
int y,
double ax,
double ay,
double rot)
addition: rot specifies rotation angle around the anchor. negative values additionally flip the text on the horizontal axis of the text. |
void |
drawString(java.lang.String txt,
int x,
int y,
int attr)
draw string with special attributes set (e.g. alignment etc.) |
void |
end()
|
void |
endAlphaBlock()
|
void |
fallbackAlpha()
|
void |
fillArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
|
void |
fillOval(int x,
int y,
int rx,
int ry)
|
void |
fillPolygon(int[] x,
int[] y,
int pts)
|
void |
fillRect(int x1,
int y1,
int w,
int h)
|
void |
fillRoundRect(int x1,
int y1,
int x2,
int y2,
int dx,
int dy)
|
java.awt.Rectangle |
getBounds()
|
int |
getHeightEstimate(java.lang.String s)
|
int |
getWidthEstimate(java.lang.String s)
|
boolean |
internalSupportsAlpha()
|
void |
lineTo(int x,
int y)
|
void |
moveTo(int x,
int y)
|
void |
nextLayer()
|
void |
nextObject()
|
void |
nextObject(java.lang.String name)
|
void |
oval(int x,
int y,
int rx,
int ry)
|
void |
passVersionInfo(int ver,
java.lang.String verString)
|
void |
polygon(int[] x,
int[] y,
int pts,
boolean close)
|
void |
rect(int x1,
int y1,
int x2,
int y2)
|
void |
resetClip()
|
void |
resetGlobalAlpha()
|
void |
roundRect(int x1,
int y1,
int x2,
int y2,
int dx,
int dy)
|
void |
setBounds(int w,
int h)
|
void |
setBounds(int x,
int y,
int w,
int h)
|
void |
setBrushColor(float r,
float g,
float b)
|
void |
setBrushColor(float r,
float g,
float b,
float a)
|
void |
setBrushColor(java.lang.String nam)
|
void |
setBrushColor(java.lang.String nam,
float alpha)
|
void |
setClip(int x,
int y,
int width,
int height)
|
void |
setColor(java.awt.Color c)
|
void |
setColor(float r,
float g,
float b,
float a)
|
void |
setColor(int R,
int G,
int B)
|
void |
setColor(java.lang.String nam)
|
void |
setColor(java.lang.String nam,
float alpha)
|
void |
setFillStyle(int s)
|
void |
setFontFace(int face)
set font face by style |
void |
setFontFace(int face,
java.lang.String name)
just a shortcut for a sequence of setFontFace(face); setOptionalFace(name); |
void |
setFontSize(double pt)
|
void |
setFontStyle(int attr)
|
void |
setGlobalAlpha(float alpha)
|
void |
setLineWidth(float w)
|
void |
setOptionalFace(java.lang.String name)
set optional font face. the underlying system will use the face only if it's available. |
void |
setOutPrintStream(java.io.PrintStream pstr)
|
void |
setPenColor(float r,
float g,
float b)
|
void |
setPenColor(float r,
float g,
float b,
float a)
|
void |
setPenColor(java.lang.String nam)
|
void |
setPenColor(java.lang.String nam,
float alpha)
|
void |
setTitle(java.lang.String t)
|
void |
useJointColors(boolean jc)
sets the jointColors flag. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TA_Left
public static final int TA_Right
public static final int TA_Center
public static final int TA_MASK_Or
public static final int FA_Normal
public static final int FA_Ital
public static final int FA_Bold
public static final int FA_MASK_Type
public static final int FF_SansSerif
public static final int FF_Serif
public static final int FF_Mono
public java.lang.String versionString
public int version
public int localLayerCache
Constructor Detail |
---|
public PoGraSS()
Method Detail |
---|
public void setOutPrintStream(java.io.PrintStream pstr)
public void setBounds(int x, int y, int w, int h)
public void setBounds(int w, int h)
public java.awt.Rectangle getBounds()
public void useJointColors(boolean jc)
jointColors
flag. Should be used after begin but before the first graphical command.
The behavior is undefined if used elsewhere.
public void passVersionInfo(int ver, java.lang.String verString)
public void addComment(java.lang.String c)
public void setTitle(java.lang.String t)
public void defineColor(java.lang.String nam, int R, int G, int B)
public void setColor(int R, int G, int B)
public void setColor(java.lang.String nam)
public void setColor(java.awt.Color c)
public void drawLine(int x1, int y1, int x2, int y2)
public void moveTo(int x, int y)
public void lineTo(int x, int y)
public void rect(int x1, int y1, int x2, int y2)
public void drawRect(int x1, int y1, int w, int h)
public void fillRect(int x1, int y1, int w, int h)
public void drawImage(PoGraSSimage img, int x1, int y1, int x2, int y2)
public void roundRect(int x1, int y1, int x2, int y2, int dx, int dy)
public void drawRoundRect(int x1, int y1, int x2, int y2, int dx, int dy)
public void fillRoundRect(int x1, int y1, int x2, int y2, int dx, int dy)
public void polygon(int[] x, int[] y, int pts, boolean close)
public void drawPolygon(int[] x, int[] y, int pts)
public void drawPolyline(int[] x, int[] y, int pts)
public void drawPolygon(int[] x, int[] y, int pts, boolean closed)
public void fillPolygon(int[] x, int[] y, int pts)
public void drawOval(int x, int y, int rx, int ry)
public void oval(int x, int y, int rx, int ry)
public void fillOval(int x, int y, int rx, int ry)
public void setLineWidth(float w)
public void setFillStyle(int s)
public void drawString(java.lang.String txt, int x, int y)
public void nextLayer()
public void begin()
public void end()
public void drawString(java.lang.String txt, int x, int y, int attr)
public void drawString(java.lang.String txt, int x, int y, double ax, double ay)
public void drawString(java.lang.String txt, int x, int y, double ax, double ay, double rot)
public void setFontFace(int face)
public void setOptionalFace(java.lang.String name)
setFontFace(int)
and refine this selection by
setting optional face. It is not guaranteed that this face will be used, keep it in mind.
example: setFontFace(FF_SansSerif); setOptionalFont("Helvetica"); setOptionalFont("Myriad");
public void setFontFace(int face, java.lang.String name)
public void setFontSize(double pt)
public void setFontStyle(int attr)
public int getWidthEstimate(java.lang.String s)
public int getHeightEstimate(java.lang.String s)
public void defineColor(java.lang.String nam, float r, float g, float b, float a)
public void setColor(java.lang.String nam, float alpha)
public void setColor(float r, float g, float b, float a)
public boolean internalSupportsAlpha()
public void beginAlphaBlock()
public void fallbackAlpha()
public void endAlphaBlock()
public void setBrushColor(java.lang.String nam)
public void setBrushColor(float r, float g, float b)
public void setBrushColor(java.lang.String nam, float alpha)
public void setBrushColor(float r, float g, float b, float a)
public void setPenColor(java.lang.String nam)
public void setPenColor(float r, float g, float b)
public void setPenColor(java.lang.String nam, float alpha)
public void setPenColor(float r, float g, float b, float a)
public void nextObject()
public void nextObject(java.lang.String name)
public void setGlobalAlpha(float alpha)
public void resetGlobalAlpha()
public void setClip(int x, int y, int width, int height)
public void resetClip()
public void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle)
public void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |