<commit_before>package org.helioviewer.jhv.export;

import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.geom.AffineTransform;
import java.awt.image.AffineTransformOp;
import java.awt.image.BufferedImage;

import org.helioviewer.jhv.opengl.GLInfo;

import com.jogamp.opengl.util.awt.ImageUtil;

public class ExportUtils {

    public static BufferedImage pasteCanvases(BufferedImage im1, BufferedImage im2, int movieLinePosition, int height) {
        ImageUtil.flipImageVertically(im1);

        if (im2 == null)
            return im1;

        BufferedImage ret = new BufferedImage(im1.getWidth(), height, im1.getType());
        Graphics2D g2 = ret.createGraphics();
        g2.drawImage(im1, null, 0, 0);

        AffineTransformOp op = new AffineTransformOp(AffineTransform.getScaleInstance(1, 1), AffineTransformOp.TYPE_BILINEAR);
        im2 = op.filter(im2, null);
        g2.drawImage(im2, 0, im1.getHeight(), im1.getWidth(), ret.getHeight() - im1.getHeight(), null);

        if (ExportMovie.EVEMovieLinePosition != -1) {
            g2.setColor(Color.BLACK);

            double scale = (ret.getHeight() - im1.getHeight()) / (double) im2.getHeight();
            AffineTransform at = AffineTransform.getTranslateInstance(0, im1.getHeight());
            at.concatenate(AffineTransform.getScaleInstance(scale, scale));
            g2.setTransform(at);
            g2.drawLine(movieLinePosition * GLInfo.pixelScale[0], 0, movieLinePosition * GLInfo.pixelScale[0], im2.getHeight());
        }

        g2.dispose();

        return ret;
    }

}<commit_msg>Fix movie line<commit_after>package org.helioviewer.jhv.export;

import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.geom.AffineTransform;
import java.awt.image.AffineTransformOp;
import java.awt.image.BufferedImage;

import org.helioviewer.jhv.opengl.GLInfo;

import com.jogamp.opengl.util.awt.ImageUtil;

public class ExportUtils {

    public static BufferedImage pasteCanvases(BufferedImage im1, BufferedImage im2, int movieLinePosition, int height) {
        ImageUtil.flipImageVertically(im1);

        if (im2 == null)
            return im1;

        BufferedImage ret = new BufferedImage(im1.getWidth(), height, im1.getType());
        Graphics2D g2 = ret.createGraphics();
        g2.drawImage(im1, null, 0, 0);

        AffineTransformOp op = new AffineTransformOp(AffineTransform.getScaleInstance(1, 1), AffineTransformOp.TYPE_BILINEAR);
        im2 = op.filter(im2, null);
        g2.drawImage(im2, 0, im1.getHeight(), im1.getWidth(), ret.getHeight() - im1.getHeight(), null);

        if (ExportMovie.EVEMovieLinePosition != -1) {
            g2.setColor(Color.BLACK);

            double scaleY = (ret.getHeight() - im1.getHeight()) / (double) im2.getHeight();
            double scaleX = ret.getWidth() / (double) im2.getWidth();

            AffineTransform at = AffineTransform.getTranslateInstance(0, im1.getHeight());
            at.concatenate(AffineTransform.getScaleInstance(scaleX, scaleY));
            g2.setTransform(at);
            g2.drawLine(movieLinePosition * GLInfo.pixelScale[0], 0, movieLinePosition * GLInfo.pixelScale[0], im2.getHeight());
        }

        g2.dispose();

        return ret;
    }

}
{'fraction_non_alphanumeric': 0.12086553323029366, 'fraction_numerical': 0.023183925811437404, 'mean_word_length': 3.2467191601049867, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2648792', 'n_tokens_mistral': 1086, 'n_tokens_neox': 1045, 'n_words': 189}