<commit_before>#include "sidebysiderender.h"

SideBySideRender::SideBySideRender(){
}

QImage SideBySideRender::draw(QImage imgL, QImage imgR, int panX, int panY, int finalwidth, int finalheight, float zoom){
    // Default Stereo Draw is Anglaph
    QTime starttime = QTime::currentTime();

    if(finalwidth > 0 && finalheight > 0){
    }
    else{
        finalwidth = imgL.width()*2;
        finalheight = imgL.height();
    }

    if(zoom == 0){
        imgL = imgL.scaledToWidth(finalwidth/2);
        imgR = imgR.scaledToWidth(finalwidth/2);
    }
    else{
        imgL = imgL.scaledToWidth(imgL.width()*zoom/2);
        imgR = imgR.scaledToWidth(imgR.width()*zoom/2);
    }
    panY += finalheight/2 - imgL.height()/2;
    panY /= 2;
<commit_msg>Fixed side-by-side pan not vertically centered.<commit_after>#include "sidebysiderender.h"

SideBySideRender::SideBySideRender(){
}

QImage SideBySideRender::draw(QImage imgL, QImage imgR, int panX, int panY, int finalwidth, int finalheight, float zoom){
    // Default Stereo Draw is Anglaph
    QTime starttime = QTime::currentTime();

    if(finalwidth > 0 && finalheight > 0){
    }
    else{
        finalwidth = imgL.width()*2;
        finalheight = imgL.height();
    }

    if(zoom == 0){
        imgL = imgL.scaledToWidth(finalwidth/2);
        imgR = imgR.scaledToWidth(finalwidth/2);
    }
    else{
        imgL = imgL.scaledToWidth(imgL.width()*zoom/2);
        imgR = imgR.scaledToWidth(imgR.width()*zoom/2);
    }
    panY += finalheight - imgL.height();
    panY /= 2;

{'fraction_non_alphanumeric': 0.137012987012987, 'fraction_numerical': 0.012987012987012988, 'mean_word_length': 2.961439588688946, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '4606080', 'n_tokens_mistral': 562, 'n_tokens_neox': 542, 'n_words': 107}