renderer.renderRow(g, charWidth, charHeight, hasHiddenColumns,
av, hiddenColumns, columnSelection, row,
row_annotations, startRes, endRes, row.graphMin,
- row.graphMax, y);
+ row.graphMax, y, isVectorRendering());
}
if (debugRedraw)
{
*/
package jalview.renderer;
+import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.Stroke;
import jalview.api.AlignViewportI;
import jalview.datamodel.AlignmentAnnotation;
boolean hasHiddenColumns, AlignViewportI viewport,
HiddenColumns hiddenColumns, ColumnSelection columnSelection,
AlignmentAnnotation _aa, Annotation[] aa_annotations, int sRes,
- int eRes, float min, float max, int y)
+ int eRes, float min, float max, int y, boolean isVectorRendering)
{
if (sRes > aa_annotations.length)
{
{
return;
}
+ Graphics2D g2d = (Graphics2D) g;
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
+ RenderingHints.VALUE_ANTIALIAS_OFF);
+ g2d.setStroke(thinRectangularLineStroke);
while (x < eRes - sRes)
{
column = sRes + x;
(int) ((col.getBlue() + gpcol.getBlue()) / 2f));
}
g.setColor(col);
- if (cgeom.pixels_step > 1)
+ if (isVectorRendering || cgeom.pixels_step > 1)
{
- g.fillRect(x * charWidth, botY + ht, charWidth,
+ g2d.fillRect(x * charWidth, botY + ht, charWidth,
cgeom.pixels_step);
}
else
{
- g.drawLine(x * charWidth, botY + ht, (x + 1) * charWidth,
+ g2d.drawLine(x * charWidth, botY + ht, (x + 1) * charWidth - 1,
botY + ht);
}
}
}
+ private static Stroke thinRectangularLineStroke = new BasicStroke(1,
+ BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL);
+
Color shadeFor(float min, float max, float value)
{
return jalview.util.ColorUtils.getGraduatedColour(value, 0,
*/
package jalview.renderer.api;
+import java.awt.Graphics;
+
import jalview.api.AlignViewportI;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.Annotation;
import jalview.datamodel.ColumnSelection;
import jalview.datamodel.HiddenColumns;
-import java.awt.Graphics;
-
public interface AnnotationRowRendererI
{
boolean hasHiddenColumns, AlignViewportI av,
HiddenColumns hiddenColumns, ColumnSelection columnSelection,
AlignmentAnnotation row, Annotation[] row_annotations,
- int startRes, int endRes, float graphMin, float graphMax, int y);
+ int startRes, int endRes, float graphMin, float graphMax, int y,
+ boolean isVectorRendering);
}