Interface GeneiousGraphics2D
-
public interface GeneiousGraphics2D
Provides some (but not all) of the functionality ofGraphics2D
, but also provides some extra useful methods The primary reason for the existence of this interface is so thatSequenceGraphs
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.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
drawLine(int x1, int y1, int x2, int y2)
SeeGraphics.drawLine(int, int, int, int)
void
drawOval(int x1, int y1, int width, int height)
SeeGraphics.drawOval(int, int, int, int)
void
drawPolygon(java.awt.Polygon polygon)
SeeGraphics.drawPolygon(java.awt.Polygon)
.void
drawPolyLine(int[] x, int[] y, int nPoints)
SeeGraphics.drawPolyline(int[], int[], int)
void
drawRect(int x1, int y1, int width, int height)
SeeGraphics.drawRect(int, int, int, int)
void
drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
SeeGraphics.drawRoundRect(int, int, int, int, int, int)
void
drawString(java.lang.String text, int x, int y)
SeeGraphics2D.drawString(String, int, int)
.void
drawStringCentred(java.lang.String text, int centreX, int centreY)
Just likeGraphics2D.drawString(String,int,int)
except that the text is centred atcentreX
,centreY
void
drawStringWithinBounds(java.lang.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 locationvoid
fillOval(int x1, int y1, int width, int height)
SeeGraphics.fillOval(int, int, int, int)
void
fillPolygon(java.awt.Polygon polygon)
SeeGraphics.fillPolygon(java.awt.Polygon)
void
fillRect(int x1, int y1, int width, int height)
SeeGraphics.fillRect(int, int, int, int)
void
fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
SeeGraphics.fillRoundRect(int, int, int, int, int, int)
java.awt.Color
getColor()
SeeGraphics.getColor()
java.awt.Composite
getComposite()
java.awt.Font
getFont()
SeeGraphics.getFont()
java.awt.Graphics2D
getGraphicsIfFlat()
java.awt.Paint
getPaint()
SeeGraphics2D.getPaint()
java.awt.Graphics2D
getRealGraphics()
java.lang.Object
getRenderingHint(java.awt.RenderingHints.Key hintKey)
SeeGraphics2D.getRenderingHint(java.awt.RenderingHints.Key)
.java.awt.Stroke
getStroke()
SeeGraphics2D.getStroke()
void
setColor(java.awt.Color color)
SeeGraphics.setColor(java.awt.Color)
void
setComposite(java.awt.Composite comp)
void
setFont(java.awt.Font font)
SeeGraphics.setFont(java.awt.Font)
void
setPaint(java.awt.Paint stroke)
SeeGraphics2D.setPaint(java.awt.Paint)
void
setRenderingHint(java.awt.RenderingHints.Key hintKey, java.lang.Object hintValue)
SeeGraphics2D.setRenderingHint(java.awt.RenderingHints.Key, Object)
.void
setStroke(java.awt.Stroke stroke)
SeeGraphics2D.setStroke(java.awt.Stroke)
-
-
-
Method Detail
-
getGraphicsIfFlat
java.awt.Graphics2D getGraphicsIfFlat()
- Returns:
- get wrapped Graphics2D if this GeneiousGraphics2D is for a flat (non-circular) view or null for a non-linear (circular) view. This is useful for performing more advanced graphics tweaks that you wouldn't normally show on a linear view.
- Since:
- API 4.61 (Geneious 5.6.1)
-
getRealGraphics
java.awt.Graphics2D getRealGraphics()
- Returns:
- get wrapped Graphics2D. This is useful for performing more advanced graphics tweaks such as setting anti-aliasing.
- Since:
- API 4.910 (Geneious 9.1.0)
-
drawPolygon
void drawPolygon(java.awt.Polygon polygon)
SeeGraphics.drawPolygon(java.awt.Polygon)
.
-
setRenderingHint
void setRenderingHint(java.awt.RenderingHints.Key hintKey, java.lang.Object hintValue)
SeeGraphics2D.setRenderingHint(java.awt.RenderingHints.Key, Object)
.
-
getRenderingHint
java.lang.Object getRenderingHint(java.awt.RenderingHints.Key hintKey)
SeeGraphics2D.getRenderingHint(java.awt.RenderingHints.Key)
.
-
setComposite
void setComposite(java.awt.Composite comp)
- See Also:
Graphics2D.setComposite(java.awt.Composite)
-
getComposite
java.awt.Composite getComposite()
- See Also:
Graphics2D.getComposite()
-
fillPolygon
void fillPolygon(java.awt.Polygon polygon)
SeeGraphics.fillPolygon(java.awt.Polygon)
-
setColor
void setColor(java.awt.Color color)
SeeGraphics.setColor(java.awt.Color)
-
setFont
void setFont(java.awt.Font font)
SeeGraphics.setFont(java.awt.Font)
-
setStroke
void setStroke(java.awt.Stroke stroke)
SeeGraphics2D.setStroke(java.awt.Stroke)
-
setPaint
void setPaint(java.awt.Paint stroke)
SeeGraphics2D.setPaint(java.awt.Paint)
-
getColor
java.awt.Color getColor()
SeeGraphics.getColor()
-
getStroke
java.awt.Stroke getStroke()
SeeGraphics2D.getStroke()
-
getPaint
java.awt.Paint getPaint()
SeeGraphics2D.getPaint()
-
getFont
java.awt.Font getFont()
SeeGraphics.getFont()
-
drawString
void drawString(java.lang.String text, int x, int y)
SeeGraphics2D.drawString(String, int, int)
.
-
drawStringCentred
void drawStringCentred(java.lang.String text, int centreX, int centreY)
Just likeGraphics2D.drawString(String,int,int)
except that the text is centred atcentreX
,centreY
-
drawStringWithinBounds
void drawStringWithinBounds(java.lang.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- Parameters:
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 clockwise
-
fillRect
void fillRect(int x1, int y1, int width, int height)
SeeGraphics.fillRect(int, int, int, int)
-
drawRect
void drawRect(int x1, int y1, int width, int height)
SeeGraphics.drawRect(int, int, int, int)
-
drawLine
void drawLine(int x1, int y1, int x2, int y2)
SeeGraphics.drawLine(int, int, int, int)
-
drawPolyLine
void drawPolyLine(int[] x, int[] y, int nPoints)
SeeGraphics.drawPolyline(int[], int[], int)
-
drawRoundRect
void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
SeeGraphics.drawRoundRect(int, int, int, int, int, int)
-
fillRoundRect
void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
SeeGraphics.fillRoundRect(int, int, int, int, int, int)
-
fillOval
void fillOval(int x1, int y1, int width, int height)
SeeGraphics.fillOval(int, int, int, int)
-
drawOval
void drawOval(int x1, int y1, int width, int height)
SeeGraphics.drawOval(int, int, int, int)
-
-