From: amwaterhouse Date: Thu, 1 Sep 2005 13:19:28 +0000 (+0000) Subject: No need to recalculate image for font change X-Git-Tag: Release_2_05b~72 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=c1d5d99668a2f897923f36234c8d86d14cf4f818;p=jalview.git No need to recalculate image for font change --- diff --git a/src/jalview/appletgui/OverviewPanel.java b/src/jalview/appletgui/OverviewPanel.java index 93ff487..2ddc5ff 100755 --- a/src/jalview/appletgui/OverviewPanel.java +++ b/src/jalview/appletgui/OverviewPanel.java @@ -299,6 +299,12 @@ public class OverviewPanel public void setBoxPosition() { + int fullsizeWidth = av.alignment.getWidth() * av.getCharWidth(); + int fullsizeHeight = av.alignment.getHeight() * av.getCharHeight(); + + scalew = (float) width / (float) fullsizeWidth; + scaleh = (float) sequencesHeight / (float) fullsizeHeight; + boxX = (int) (av.getStartRes() * av.getCharWidth() * scalew); boxY = (int) (av.getStartSeq() * av.getCharHeight() * scaleh); boxWidth = (int) ( (av.getEndRes() - av.getStartRes() + 1) * diff --git a/src/jalview/gui/OverviewPanel.java b/src/jalview/gui/OverviewPanel.java index 6c968a2..f78f2e6 100755 --- a/src/jalview/gui/OverviewPanel.java +++ b/src/jalview/gui/OverviewPanel.java @@ -342,6 +342,12 @@ public class OverviewPanel extends JPanel implements Runnable */ public void setBoxPosition() { + int fullsizeWidth = av.alignment.getWidth() * av.getCharWidth(); + int fullsizeHeight = av.alignment.getHeight() * av.getCharHeight(); + + scalew = (float) width / (float) fullsizeWidth; + scaleh = (float) sequencesHeight / (float) fullsizeHeight; + boxX = (int) (av.getStartRes() * av.getCharWidth() * scalew); boxY = (int) (av.getStartSeq() * av.getCharHeight() * scaleh); boxWidth = (int) ((av.getEndRes() - av.getStartRes() + 1) * av.getCharWidth() * scalew);