From dc6defe64fcb81cc43d886cca3076a7fb4a24f5d Mon Sep 17 00:00:00 2001 From: gmungoc Date: Thu, 30 Aug 2018 16:27:33 +0100 Subject: [PATCH] JAL-3079 don't create new Graphics to draw as it confuses PDFGraphics --- src/jalview/gui/SeqCanvas.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/jalview/gui/SeqCanvas.java b/src/jalview/gui/SeqCanvas.java index d7d9ccb..456ce3c 100755 --- a/src/jalview/gui/SeqCanvas.java +++ b/src/jalview/gui/SeqCanvas.java @@ -765,7 +765,7 @@ public class SeqCanvas extends JPanel implements ViewportListenerI * @param endColumn * @param canvasHeight */ - protected void drawWrappedWidth(Graphics gg, int ypos, int startColumn, + protected void drawWrappedWidth(Graphics g, int ypos, int startColumn, int endColumn, int canvasHeight) { ViewportRanges ranges = av.getRanges(); @@ -792,7 +792,9 @@ public class SeqCanvas extends JPanel implements ViewportListenerI // // Anyway, this works and, I suggest, is better design anyway. // - Graphics g = gg.create(); + // Graphics g = gg.create(); + // mc 30/08/18 undone because gnu.jpdf.PDFGraphics doesn't handle + // get/setTransform g.translate(xOffset, 0); @@ -835,8 +837,8 @@ public class SeqCanvas extends JPanel implements ViewportListenerI startColumn, endx + 1); g.translate(0, -cHeight - ypos - 3); } - g.dispose(); -// g.translate(-xOffset, 0); + // g.dispose(); + g.translate(-xOffset, 0); // g.setClip(clip); } -- 1.7.10.2