JAL-3364 revisions to split frame image export
[jalview.git] / src / jalview / renderer / AnnotationRenderer.java
index 0a4c2d5..dcf2f20 100644 (file)
@@ -419,6 +419,8 @@ public class AnnotationRenderer
 
   boolean rna = false;
 
+  private int lastDrawnHeight;
+
   /**
    * Render the annotation rows associated with an alignment.
    * 
@@ -1093,14 +1095,22 @@ public class AnnotationRenderer
       System.err.println("Annotation Rendering time:"
               + (System.currentTimeMillis() - stime));
     }
-    if (!av.getWrapAlignment())
-    {
-      g.translate(0, y);
-    }
+    lastDrawnHeight = y;
 
     return !usedFaded;
   }
 
+  /**
+   * Answers the height in pixels of what was drawn on the graphics in the last
+   * call to {@code drawComponent}
+   * 
+   * @return
+   */
+  public int getLastDrawnHeight()
+  {
+    return lastDrawnHeight;
+  }
+
   public static final Color GLYPHLINE_COLOR = Color.gray;
 
   public static final Color SHEET_COLOUR = Color.green;