From: gmungoc Date: Thu, 30 Aug 2018 15:27:33 +0000 (+0100) Subject: JAL-3079 don't create new Graphics to draw as it confuses PDFGraphics X-Git-Tag: Release_2_11_4_0~45^2~18^2~452 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=dc6defe64fcb81cc43d886cca3076a7fb4a24f5d;p=jalview.git JAL-3079 don't create new Graphics to draw as it confuses PDFGraphics --- 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); }