Skip to content

Commit

Permalink
Statistic viewer image html export improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
A-Herzog committed Apr 23, 2024
1 parent e778b2a commit ab54fa8
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -267,12 +267,17 @@ private boolean saveImage(final BufferedImage image, final File imageFile) {
@Override
public int saveHtml(BufferedWriter bw, File mainFile, int nextImageNr, boolean imagesInline) throws IOException {
/* Grafik erzeugen */
if (panel==null) panelNeeded();
final int imageSize=getImageSize();
final BufferedImage image=new BufferedImage(imageSize,imageSize,BufferedImage.TYPE_INT_RGB);
final Graphics g=image.getGraphics();
g.setClip(0,0,imageSize,imageSize);
if (panel instanceof JGetImage) ((JGetImage)panel).paintToGraphics(g); else panel.paint(g);
BufferedImage image;

image=getImage(imageSize,imageSize);
if (image==null) {
if (panel==null) panelNeeded();
image=new BufferedImage(imageSize,imageSize,BufferedImage.TYPE_INT_RGB);
final Graphics g=image.getGraphics();
g.setClip(0,0,imageSize,imageSize);
if (panel instanceof JGetImage) ((JGetImage)panel).paintToGraphics(g); else panel.paint(g);
}

if (imagesInline) {
/* Ausgabe als Inline-Grafik */
Expand Down

0 comments on commit ab54fa8

Please sign in to comment.