#65 stretch images to fit into text cells
[fanfix.git] / src / jexer / backend / SwingTerminal.java
index c2b335f43380e2b1e22ae4ee7b0d5556baad2ab0..eb1616bf741c5271afc226fe16d6f4a98e4732dd 100644 (file)
@@ -1244,9 +1244,11 @@ public class SwingTerminal extends LogicalScreen
         BufferedImage image = cell.getImage();
         if (image != null) {
             if (swing.getFrame() != null) {
-                gr.drawImage(image, xPixel, yPixel, swing.getFrame());
+                gr.drawImage(image, xPixel, yPixel, getTextWidth(),
+                    getTextHeight(), swing.getFrame());
             } else {
-                gr.drawImage(image, xPixel, yPixel, swing.getComponent());
+                gr.drawImage(image, xPixel, yPixel,  getTextWidth(),
+                    getTextHeight(),swing.getComponent());
             }
             return;
         }