<commit_before>#include "Application.hpp"

#define IM_ARRAYSIZE(ARR)  ((int)(sizeof(ARR)/sizeof(*ARR)))


void Application::processEvent(sf::Clock deltaClock)
{
    sf::Event event;
    while (m_window.pollEvent(event))
    {
        ImGui::SFML::ProcessEvent(event);

        if (event.type == sf::Event::Closed)
                m_window.close();
    }

    ImGui::SFML::Update(m_window, deltaClock.restart());
}


void Application::render()
{
    m_bg.draw(m_renderTexture[0]);
    m_figure.Figure::draw(m_renderTexture[1]);

    m_window.clear();

    for(auto &texture: m_renderTexture)
        m_window.draw(sf::Sprite(texture.getTexture()));

    m_window.resetGLStates();

    UI();

    m_window.display();
}


void Application::run()
{
    sf::Clock deltaClock;
    while (m_window.isOpen())
    {
        processEvent(deltaClock);
        render();
    }

    ImGui::SFML::Shutdown();
}


void Application::UI(){
    const char* type[]{"Curve","Gasket"};
    int typeIndex = 1;

    const char* gasketSubType[]{"Sierpinski sieves","Sierpinski carpet"};<commit_msg>[f]: renderTexture.texture and renderWindow have different zero point<commit_after>#include "Application.hpp"

#define IM_ARRAYSIZE(ARR)  ((int)(sizeof(ARR)/sizeof(*ARR)))


void Application::processEvent(sf::Clock deltaClock)
{
    sf::Event event;
    while (m_window.pollEvent(event))
    {
        ImGui::SFML::ProcessEvent(event);

        if (event.type == sf::Event::Closed)
                m_window.close();
    }

    ImGui::SFML::Update(m_window, deltaClock.restart());
}


void Application::render()
{
    m_bg.draw(m_renderTexture[0]);
    m_figure.Figure::draw(m_renderTexture[1]);

    m_window.clear();

    for(auto &texture: m_renderTexture){
        sf::Sprite sprite(texture.getTexture());
        sprite.setOrigin(0, texture.getSize().y);
        sprite.setScale(1,-1);
        m_window.draw(sprite);
    }
    m_window.resetGLStates();

    UI();

    m_window.display();
}


void Application::run()
{
    sf::Clock deltaClock;
    while (m_window.isOpen())
    {
        processEvent(deltaClock);
        render();
    }

    ImGui::SFML::Shutdown();
}


void Application::UI(){
    const char* type[]{"Curve","Gasket"};
    int typeIndex = 1;

    const char* gasketSubType[]{"Sierpinski sieves","Sierpinski carpet"};
{'fraction_non_alphanumeric': 0.16421780466724287, 'fraction_numerical': 0.0038893690579083835, 'mean_word_length': 3.512670565302144, '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': '2432208', 'n_tokens_mistral': 790, 'n_tokens_neox': 756, 'n_words': 117}