|
TPTP 4.2.0 Platform Project Internal API Specification |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.tptp.platform.report.igc.svg.internal.SVGGC
Test for SVG implementation on IGC.... Special feature added on SVG: - fillRect(int,int,int,int) and fillRect(Rect) support GradientBrush. Note: SVG use clockwise angle whereas IGC uses counter-clockwise angle !.
| Field Summary | |
|---|---|
protected IBrush |
brush_
|
protected int |
fill_
|
protected IFont |
font_
|
protected org.eclipse.tptp.platform.report.igc.svg.internal.SVGGC.GCDirect |
gd_
|
protected int |
gradient_number_
|
protected IPen |
pen_
|
protected int |
stroke_
|
protected int |
stroke_opacity_
|
protected int |
stroke_width_
|
protected int |
strokedasharray_
|
| Fields inherited from interface org.eclipse.tptp.platform.report.igc.internal.IGC |
|---|
C_INFO_BACKGROUND, C_INFO_FOREGROUND, C_LIST_BACKGROUND, C_LIST_FOREGROUND, C_LIST_SELECTION_BACKGROUND, C_LIST_SELECTION_TEXT, C_TITLE_BACKGROUND, C_TITLE_BACKGROUND_GRADIENT, C_TITLE_FOREGROUND, C_TITLE_INACTIVE_BACKGROUND, C_TITLE_INACTIVE_BACKGROUND_GRADIENT, C_TITLE_INACTIVE_FOREGROUND, C_WIDGET_BACKGROUND, C_WIDGET_BORDER, C_WIDGET_DARK_SHADOW, C_WIDGET_FOREGROUND, C_WIDGET_HIGHLIGHT_SHADOW, C_WIDGET_LIGHT_SHADOW, C_WIDGET_NORMAL_SHADOW |
| Constructor Summary | |
|---|---|
SVGGC(java.io.OutputStream output,
int w,
int h)
Builds a new SVG GC |
|
| Method Summary | |
|---|---|
void |
begin()
starts a drawing session |
void |
drawArc(int xc,
int yc,
double _r1_angle,
int r1,
int r2,
double _start_angle,
double _arc_length)
draw an oriented arc defined by start angle and length (>0 means counter-clockwise in the sense (1,0)>(0,1)). |
void |
drawCircle(int cx,
int cy,
int radius)
Draw a circle of radius and centered at (cx,cy) using current brush or color. |
void |
drawEllipse(int xc,
int yc,
double _r1_angle,
int r1,
int r2)
Draw an oriented ellipse, not necessary coordinate aligned one. |
void |
drawFocus(int x,
int y,
int w,
int h)
Not implemented in SVG do nothing |
void |
drawFocus(IRect rect)
Draw the focus with rectangle object. |
void |
drawHLine(int x1,
int x2,
int y)
|
void |
drawImage(IImage image,
int x,
int y)
draw image at given location |
void |
drawImage(IImage image,
int srcX,
int srcY,
int srcW,
int srcH)
draw image resized to a rectangle |
void |
drawImage(IImage image,
int srcX,
int srcY,
int srcW,
int srcH,
int dstX,
int dstY,
int dstW,
int dstH)
draw part of image resized to a rectangle |
void |
drawLine(int x1,
int y1,
int x2,
int y2)
Draw a line using current pen. points are expressed in pixel coordinates |
void |
drawOval(int x,
int y,
int w,
int h)
Draw using current brush or color the oval defined inside given rectangle. |
void |
drawPath(IPath path)
Supported path: IPolygon. |
void |
drawPoint(int x,
int y)
Draw pixel at location (x,y) using current brush |
void |
drawPoly(IPolygon poly)
draw the polygon using current brush or color. |
void |
drawRect(int x,
int y,
int w,
int h)
Draw the outline of rectangle using current pen. |
void |
drawRect(IRect r)
Draw the outline of rectangle using current pen. |
void |
drawText(java.lang.String text,
int x,
int y)
Draw text at given location, x,y is the upper left corner. |
void |
drawText(java.lang.String text,
int x,
int y,
double angle)
Draw rotated text at given location (uppper left corner). |
void |
drawVLine(int x,
int y1,
int y2)
|
void |
end()
terminates a drawing session |
void |
fillArc(int xc,
int yc,
double _r1_angle,
int r1,
int r2,
double _start_angle,
double _arc_length)
fill an oriented arc defined by start angle and length (>0 means counter-clockwise in the sense (1,0)>(0,1)). |
void |
fillCircle(int cx,
int cy,
int radius)
Fill circle using current brush or color |
void |
fillEllipse(int xc,
int yc,
double _r1_angle,
int r1,
int r2)
Fill an oriented ellipse, not necessary coordinate aligned one. |
void |
fillOval(int x,
int y,
int w,
int h)
Fill using current brush or color the oval defined inside given rectangle. |
void |
fillPoly(IPolygon poly)
fill the polygon using current brush or color. |
void |
fillRect(int x,
int y,
int w,
int h)
Fill rectangle including outline using current brush (@see IRect for rectangle definition). |
void |
fillRect(IRect r)
Fill rectangle including outline using current brush |
void |
fillShape(IShape shape)
Supported shapes: IRect, Oval. |
IBrush |
getBrush()
|
IShape |
getClipping()
|
IFont |
getFont()
|
IFontMetrics |
getFontMetrics()
|
IGCDirect |
getIGCDirect()
|
java.io.OutputStream |
getOutputStream()
|
IPen |
getPen()
|
int |
getPoint(int x,
int y)
|
int |
getSystemColor(int id)
Return system color for given id. |
IBrush |
setBrush(IBrush _brush)
Support: -SolidBrush. |
IShape |
setClipping(IShape s)
Change current clipping area, and return previous one. |
IFont |
setFont(IFont font)
Change current font and return previous one (can be null) |
void |
setOutputStream(java.io.OutputStream os_)
|
IPen |
setPen(IPen _pen)
Supports LineStylePen, but extract only color for it. |
protected void |
svg2Coord(int x1,
int y1,
int x2,
int y2,
java.lang.StringBuffer b)
|
protected void |
svgColor(int rgba,
java.lang.StringBuffer b)
|
protected void |
svgCoord(int x,
int y,
java.lang.StringBuffer b)
|
protected void |
svgEllipse(int cx,
int cy,
int rx,
int ry,
java.lang.StringBuffer b)
|
protected void |
svgFill(java.lang.StringBuffer b)
|
protected void |
svgFont(java.lang.StringBuffer b)
|
protected java.lang.String |
svgGradient(FullGradientBrush b,
int x1,
int y1,
int x2,
int y2)
|
protected java.lang.String |
svgGradient(GradientBrush b,
int x1,
int y1,
int x2,
int y2)
|
protected void |
svgPoints(int[] x,
int[] y,
java.lang.StringBuffer b)
|
protected void |
svgRect(int x,
int y,
int w,
int h,
int rx,
int ry,
java.lang.StringBuffer b)
|
protected void |
svgStroke(java.lang.StringBuffer b)
|
protected void |
svgWrite(java.lang.String string)
Generates a String into the stream format. |
ISize |
textExtent(java.lang.String text)
|
ISize |
textExtent(java.lang.String text,
double angle)
|
IPolygon |
textExtent(java.lang.String text,
int x,
int y,
double angle)
|
protected void |
Unsupported(java.lang.String what)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected IBrush brush_
protected IPen pen_
protected IFont font_
protected int fill_
protected int stroke_
protected int strokedasharray_
protected int stroke_width_
protected int stroke_opacity_
protected int gradient_number_
protected org.eclipse.tptp.platform.report.igc.svg.internal.SVGGC.GCDirect gd_
| Constructor Detail |
public SVGGC(java.io.OutputStream output,
int w,
int h)
| Method Detail |
public IGCDirect getIGCDirect()
getIGCDirect in interface IGCpublic int getSystemColor(int id)
IGC
getSystemColor in interface IGCid - identifiant of system color, see C_xxx constants
class.public void begin()
public void end()
public IBrush getBrush()
getBrush in interface IGCpublic IBrush setBrush(IBrush _brush)
setBrush in interface IGCIGC.setBrush(org.eclipse.tptp.platform.report.igc.internal.IBrush)public IPen getPen()
getPen in interface IGC
public int getPoint(int x,
int y)
getPoint in interface IGCx - coordinate of point to get color.y - coorindate of point to get color.
public IPen setPen(IPen _pen)
setPen in interface IGCIGC.setPen(org.eclipse.tptp.platform.report.igc.internal.IPen)public IFont getFont()
getFont in interface IGCpublic IFont setFont(IFont font)
IGC
setFont in interface IGC
public void drawHLine(int x1,
int x2,
int y)
public void drawVLine(int x,
int y1,
int y2)
public void drawLine(int x1,
int y1,
int x2,
int y2)
IGC
drawLine in interface IGC
public void drawPoint(int x,
int y)
IGC
drawPoint in interface IGC
public void drawCircle(int cx,
int cy,
int radius)
IGC
drawCircle in interface IGC
public void fillCircle(int cx,
int cy,
int radius)
IGC
fillCircle in interface IGC
public void drawOval(int x,
int y,
int w,
int h)
IGC
drawOval in interface IGC
public void fillOval(int x,
int y,
int w,
int h)
IGC
fillOval in interface IGC
public void drawArc(int xc,
int yc,
double _r1_angle,
int r1,
int r2,
double _start_angle,
double _arc_length)
IGC
drawArc in interface IGCxc - X center of the ellipse.yc - Y center of the ellipse._r1_angle - angle of main radius (r1) from X coordinate axis.r1 - main radiusr2 - secondary radius (90 degree from r1)_start_angle - start angle of arc 0 is 3 O'clock position_arc_length - arc length from start angle >0 for counter-clockwise, 2*PI for full ellipse.
public void fillArc(int xc,
int yc,
double _r1_angle,
int r1,
int r2,
double _start_angle,
double _arc_length)
IGC
fillArc in interface IGCxc - X center of the ellipse.yc - Y center of the ellipse._r1_angle - angle of main radius (r1) from X coordinate axis.r1 - main radiusr2 - secondary radius (90 degree from r1)_start_angle - start angle (radian) of arc 0 is 3 O'clock position_arc_length - arc length (radian) from start angle >0 for counter-clockwise, 2*PI for full ellipse.
public void drawEllipse(int xc,
int yc,
double _r1_angle,
int r1,
int r2)
IGC
drawEllipse in interface IGCxc - X center of the ellipse.yc - Y center of the ellipse._r1_angle - angle of main radius (r1) from X coordinate axis.r1 - main radiusr2 - secondary radius (90 degree from r1)
public void fillEllipse(int xc,
int yc,
double _r1_angle,
int r1,
int r2)
IGC
fillEllipse in interface IGCxc - X center of the ellipse.yc - Y center of the ellipse._r1_angle - angle (radian) of main radius (r1) from X coordinate axis.r1 - main radiusr2 - secondary radius (90 degree from r1)
public void fillRect(int x,
int y,
int w,
int h)
IGC
fillRect in interface IGC
public void drawRect(int x,
int y,
int w,
int h)
IGC
drawRect in interface IGCpublic void fillRect(IRect r)
IGC
fillRect in interface IGCpublic void drawRect(IRect r)
IGC
drawRect in interface IGC
public void drawImage(IImage image,
int x,
int y)
IGC
drawImage in interface IGC
public void drawImage(IImage image,
int srcX,
int srcY,
int srcW,
int srcH,
int dstX,
int dstY,
int dstW,
int dstH)
IGC
drawImage in interface IGC
public void drawImage(IImage image,
int srcX,
int srcY,
int srcW,
int srcH)
IGC
drawImage in interface IGCpublic void drawPoly(IPolygon poly)
IGC
drawPoly in interface IGCpublic void fillPoly(IPolygon poly)
IGC
fillPoly in interface IGC
public void drawText(java.lang.String text,
int x,
int y)
drawText in interface IGC
public void drawText(java.lang.String text,
int x,
int y,
double angle)
drawText in interface IGC
public void drawFocus(int x,
int y,
int w,
int h)
drawFocus in interface IGCpublic void drawFocus(IRect rect)
drawFocus in interface IGCdrawFocus(int, int, int, int)public IFontMetrics getFontMetrics()
getFontMetrics in interface IGC
public IPolygon textExtent(java.lang.String text,
int x,
int y,
double angle)
textExtent in interface IGCpublic ISize textExtent(java.lang.String text)
textExtent in interface IGC
public ISize textExtent(java.lang.String text,
double angle)
textExtent in interface IGCpublic IShape getClipping()
getClipping in interface IGCpublic IShape setClipping(IShape s)
IGC
setClipping in interface IGCpublic void fillShape(IShape shape)
fillShape in interface IGCpublic void drawPath(IPath path)
drawPath in interface IGCprotected void Unsupported(java.lang.String what)
protected void svgWrite(java.lang.String string)
protected void svgColor(int rgba,
java.lang.StringBuffer b)
protected void svgFill(java.lang.StringBuffer b)
protected void svgStroke(java.lang.StringBuffer b)
protected void svgFont(java.lang.StringBuffer b)
protected java.lang.String svgGradient(GradientBrush b,
int x1,
int y1,
int x2,
int y2)
protected java.lang.String svgGradient(FullGradientBrush b,
int x1,
int y1,
int x2,
int y2)
protected void svgCoord(int x,
int y,
java.lang.StringBuffer b)
protected void svg2Coord(int x1,
int y1,
int x2,
int y2,
java.lang.StringBuffer b)
protected void svgRect(int x,
int y,
int w,
int h,
int rx,
int ry,
java.lang.StringBuffer b)
protected void svgEllipse(int cx,
int cy,
int rx,
int ry,
java.lang.StringBuffer b)
protected void svgPoints(int[] x,
int[] y,
java.lang.StringBuffer b)
public java.io.OutputStream getOutputStream()
public void setOutputStream(java.io.OutputStream os_)
|
TPTP 4.2.0 Platform Project Internal API Specification |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||