public interface GeneiousGraphics2D
Graphics2D, but also provides
some extra useful methods
The primary reason for the existence of this interface is so that
SequenceGraphs
can be rendered as a circular view in the SequenceViewer correctly.
(we can't just use a standard AffineTransform as a circular view can not be obtained from an AffineTransform)
Despite this being interface, plug-ins should not implement this interface themselves or they risk breaking
when Geneious adds and implements additional functionality in future versions.| Modifier and Type | Method and Description |
|---|---|
void |
drawLine(int x1,
int y1,
int x2,
int y2)
|
void |
drawOval(int x1,
int y1,
int width,
int height)
|
void |
drawPolygon(Polygon polygon)
|
void |
drawPolyLine(int[] x,
int[] y,
int nPoints)
|
void |
drawRect(int x1,
int y1,
int width,
int height)
|
void |
drawRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
|
void |
drawString(String text,
int x,
int y)
|
void |
drawStringCentred(String text,
int centreX,
int centreY)
Just like
Graphics2D.drawString(String,int,int)
except that the text is centred at centreX , centreY |
void |
drawStringWithinBounds(String text,
int x,
int y,
int width,
int height,
boolean rotate)
draws the given text squashed or stretched into the given dimensions at the given location
|
void |
fillOval(int x1,
int y1,
int width,
int height)
|
void |
fillPolygon(Polygon polygon)
|
void |
fillRect(int x1,
int y1,
int width,
int height)
|
void |
fillRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
|
Color |
getColor()
|
Composite |
getComposite() |
Font |
getFont()
|
Graphics2D |
getGraphicsIfFlat() |
Paint |
getPaint()
|
Object |
getRenderingHint(RenderingHints.Key hintKey)
|
Stroke |
getStroke()
|
void |
setColor(Color color)
|
void |
setComposite(Composite comp) |
void |
setFont(Font font)
|
void |
setPaint(Paint stroke)
|
void |
setRenderingHint(RenderingHints.Key hintKey,
Object hintValue)
|
void |
setStroke(Stroke stroke)
|
Graphics2D getGraphicsIfFlat()
void drawPolygon(Polygon polygon)
void setRenderingHint(RenderingHints.Key hintKey, Object hintValue)
Object getRenderingHint(RenderingHints.Key hintKey)
void setComposite(Composite comp)
Composite getComposite()
Graphics2D.getComposite()void fillPolygon(Polygon polygon)
void setColor(Color color)
void setFont(Font font)
void setStroke(Stroke stroke)
void setPaint(Paint stroke)
Color getColor()
Stroke getStroke()
Paint getPaint()
Font getFont()
void drawString(String text, int x, int y)
void drawStringCentred(String text, int centreX, int centreY)
Graphics2D.drawString(String,int,int)
except that the text is centred at centreX , centreYvoid drawStringWithinBounds(String text, int x, int y, int width, int height, boolean rotate)
text - the text to renderx - left cornery - top cornerwidth - desired width of the squashed textheight - desired height of the squashed textrotate - if true, then rotate by 90 degrees anti clockwisevoid fillRect(int x1,
int y1,
int width,
int height)
void drawRect(int x1,
int y1,
int width,
int height)
void drawLine(int x1,
int y1,
int x2,
int y2)
void drawPolyLine(int[] x,
int[] y,
int nPoints)
void drawRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
void fillRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
void fillOval(int x1,
int y1,
int width,
int height)
void drawOval(int x1,
int y1,
int width,
int height)