{
// Console.info(nonCanColor);
- g.setColor(nonCanColor);
int sCol = (lastSSX / charWidth)
+ hiddenColumns.visibleToAbsoluteColumn(startRes);
int x1 = lastSSX;
// "+diffupstream+"
// down:"+diffdownstream);
// If a closing base pair half of the stem, display a backward arrow
+ if (diffupstream || diffdownstream)
+ {
+ // draw glyphline under arrow
+ this.drawGlyphLine(g, row_annotations, lastSSX, x, y, iconOffset,
+ startRes, column, validRes, validEnd);
+ }
+ g.setColor(nonCanColor);
if (column > 0 && Rna.isClosingParenthesis(dc))
{
{
fillPolygon(g, new int[] { lastSSX + 5, lastSSX + 5, lastSSX },
new int[]
- { y + iconOffset, y + 14 + iconOffset, y + 8 + iconOffset },
+ { y + iconOffset + 1, y + 13 + iconOffset,
+ y + 7 + iconOffset },
3);
x1 += 5;
}
// display a forward arrow
if (diffdownstream)
{
- fillPolygon(g, new int[] { x2 - 5, x2 - 5, x2 },
+ fillPolygon(g, new int[] { x2 - 6, x2 - 6, x2 - 1 },
new int[]
- { y + iconOffset, y + 14 + iconOffset, y + 8 + iconOffset },
+ { y + iconOffset + 1, y + 13 + iconOffset,
+ y + 7 + iconOffset },
3);
x2 -= 5;
}
}
}
// draw arrow body
- fillRect(g, x1, y + 4 + iconOffset, x2 - x1, 7);
+ unsetAntialias(g);
+ fillRect(g, x1 - 1, y + 4 + iconOffset, x2 - x1 + 1, 6);
}
// public void updateFromAnnotationPanel(FontMetrics annotFM, AlignViewportI
int endRes)
{
Graphics2D g2d = (Graphics2D) g;
+ /*
if (Cache.getDefault("ANTI_ALIAS", true))
{
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL,
RenderingHints.VALUE_STROKE_PURE);
}
+ */
long stime = System.currentTimeMillis();
boolean usedFaded = false;
: null;
if (x > -1)
{
+ unsetAntialias(g);
if (activeRow == i)
{
g.setColor(Color.red);
g2d.transform(
AffineTransform.getScaleInstance(fmScaling, 1.0));
}
+ setAntialias(g);
if (column == 0 || row.graph > 0)
{
g2d.drawString(displayChar, 0, 0);
// temp = x;
break;
default:
+ unsetAntialias(g);
g.setColor(GLYPHLINE_COLOR);
g.fillRect(lastSSX, y + 6 + iconOffset,
(x * charWidth) - lastSSX, 2);
+ g.drawRect(lastSSX, y + 6 + iconOffset,
+ (x * charWidth) - lastSSX - 1, 2);
// temp = x;
break;
}
int y, int iconOffset, int startRes, int column, boolean validRes,
boolean validEnd)
{
+ unsetAntialias(g);
g.setColor(GLYPHLINE_COLOR);
- unsetAntiAlias(g);
g.fillRect(lastSSX, y + 6 + iconOffset, (x * charWidth) - lastSSX, 2);
+ g.drawRect(lastSSX, y + 6 + iconOffset, (x * charWidth) - lastSSX - 1,
+ 2);
}
void drawSheetAnnot(Graphics g, Annotation[] row,
int lastSSX, int x, int y, int iconOffset, int startRes,
int column, boolean validRes, boolean validEnd)
{
- g.setColor(SHEET_COLOUR);
-
if (!validEnd || !validRes || row == null || row[column] == null
|| row[column].secondaryStructure != 'E')
{
+ // draw the glyphline underneath
+ drawGlyphLine(g, row, lastSSX, x, y, iconOffset, startRes, column,
+ validRes, validEnd);
+ g.setColor(SHEET_COLOUR);
fillRect(g, lastSSX, y + 4 + iconOffset,
(x * charWidth) - lastSSX - 4, 6);
fillPolygon(g,
new int[]
- { (x * charWidth) - 4, (x * charWidth) - 4, (x * charWidth) },
+ { (x * charWidth) - 6, (x * charWidth) - 6,
+ (x * charWidth - 1) },
new int[]
- { y + iconOffset, y + 14 + iconOffset, y + 7 + iconOffset },
+ { y + iconOffset + 1, y + 13 + iconOffset,
+ y + 7 + iconOffset },
3);
}
else
{
- fillRect(g, lastSSX, y + 4 + iconOffset,
- (x + 1) * charWidth - lastSSX, 6);
+ g.setColor(SHEET_COLOUR);
+ fillRect(g, lastSSX, y + 4 + iconOffset, x * charWidth - lastSSX, 6);
}
-
}
void drawHelixAnnot(Graphics g, Annotation[] row, int lastSSX, int x,
int ofs = charWidth / 2;
// Off by 1 offset when drawing rects and ovals
// to offscreen image on the MAC
- fillRoundRect(g, lastSSX, y + 4 + iconOffset, x2 - x1, 8, 8, 8);
+ fillRoundRect(g, lastSSX, y + 4 + iconOffset, x2 - x1 - 1, 8, 8, 8);
if (sCol == 0 || row[sCol - 1] == null
|| row[sCol - 1].secondaryStructure != 'H')
{
else
{
// g.setColor(Color.orange);
- fillRoundRect(g, lastSSX, y + 4 + iconOffset, x2 - x1 - ofs + 1, 8,
- 0, 0);
+ fillRoundRect(g, lastSSX, y + 4 + iconOffset, x2 - x1 - ofs, 8, 0,
+ 0);
}
if (!validRes || row[column] == null
|| row[column].secondaryStructure != 'H')
else
{
// g.setColor(Color.magenta);
- fillRoundRect(g, lastSSX + ofs, y + 4 + iconOffset,
- x2 - x1 - ofs + 1, 8, 0, 0);
+ fillRoundRect(g, lastSSX + ofs, y + 4 + iconOffset, x2 - x1 - ofs,
+ 8, 0, 0);
}
if (!validRes || row[column] == null
|| row[column].secondaryStructure != 'H')
{
- fillArc(g, (x * charWidth) - charWidth, y + 4 + iconOffset, charWidth,
- 8, 270, 180);
+ fillArc(g, (x * charWidth) - charWidth - 1, y + 4 + iconOffset,
+ charWidth, 8, 270, 180);
x2 -= charWidth / 2;
}
y2 = y - (int) ((0 - min / range) * graphHeight);
}
+ setAntialias(g);
g.setColor(Color.gray);
g.drawLine(x - charWidth, y2, (eRes - sRes + 1) * charWidth, y2);
private static void fillPolygon(Graphics g, int[] xpoints, int[] ypoints,
int n)
{
- setAntiAlias(g);
+ unsetAntialias(g);
+ g.fillPolygon(xpoints, ypoints, n);
+ setAntialias(g);
g.fillPolygon(xpoints, ypoints, n);
g.drawPolygon(xpoints, ypoints, n);
}
private static void fillRect(Graphics g, int a, int b, int c, int d)
{
- setAntiAlias(g);
g.fillRect(a, b, c, d);
g.drawRect(a, b, c, d);
}
private static void fillRoundRect(Graphics g, int a, int b, int c, int d,
int e, int f)
{
- setAntiAlias(g);
+ setAntialias(g);
g.fillRoundRect(a, b, c, d, e, f);
g.drawRoundRect(a, b, c, d, e, f);
}
private static void fillArc(Graphics g, int a, int b, int c, int d, int e,
int f)
{
- setAntiAlias(g);
+ setAntialias(g);
g.fillArc(a, b, c, d, e, f);
g.drawArc(a, b, c, d, e, f);
}
- private static void setAntiAlias(Graphics g)
+ private static void setAntialias(Graphics g)
{
if (Cache.getDefault("ANTI_ALIAS", true))
{
}
}
- private static void unsetAntiAlias(Graphics g)
+ private static void unsetAntialias(Graphics g)
{
Graphics2D g2d = (Graphics2D) g;
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,