<commit_before>#include "kernel.h"
#include "errorobject.h"
#include "complexdrawer.h"

using namespace Ilwis;
using namespace Geodrawer;

ComplexDrawer::ComplexDrawer(const QString &name,
                             DrawerInterface* parentDrawer,
                             RootDrawer *rootdrawer,
                             const IOOptions &options) : BaseDrawer(name, parentDrawer, rootdrawer, options)
{

}

bool ComplexDrawer::draw(const IOOptions &options)
{
    if (!isActive() || !isValid())
        return false;

    bool ok = drawSideDrawers( _preDrawers, options)    ;

    for(const auto& drawer : _mainDrawers){
        if ( drawer){
            ok &= drawer->draw( options);
        }
    }
    ok &= drawSideDrawers(_postDrawers, options);

    return ok;
}

bool ComplexDrawer::prepare(DrawerInterface::PreparationType prepType, const IOOptions &options)
{
    BaseDrawer::prepare(prepType, options);

    for( auto& drawer : _preDrawers)    {
        if (!drawer.second->prepare(prepType, options))
            return false;<commit_msg>added blending mode<commit_after>#include "kernel.h"
#include "errorobject.h"
#include "complexdrawer.h"

using namespace Ilwis;
using namespace Geodrawer;

ComplexDrawer::ComplexDrawer(const QString &name,
                             DrawerInterface* parentDrawer,
                             RootDrawer *rootdrawer,
                             const IOOptions &options) : BaseDrawer(name, parentDrawer, rootdrawer, options)
{

}

bool ComplexDrawer::draw(const IOOptions &options)
{
    if (!isActive() || !isValid())
        return false;


    bool ok = drawSideDrawers( _preDrawers, options)    ;

    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    glEnable(GL_BLEND);

    for(const auto& drawer : _mainDrawers){
        if ( drawer){
            ok &= drawer->draw( options);
        }
    }
    glDisable(GL_BLEND);

    ok &= drawSideDrawers(_postDrawers, options);

    return ok;
}

bool ComplexDrawer::prepare(DrawerInterface::PreparationType prepType, const IOOptions &options)
{
    BaseDrawer::prepare(prepType, options);

    for( auto& drawer : _preDrawers)    {
        if (!drawer.second->prepare(prepType, options))
            return false;
{'fraction_non_alphanumeric': 0.10578216046615867, 'fraction_numerical': 0.0, 'mean_word_length': 2.795918367346939, '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': '2944977', 'n_tokens_mistral': 677, 'n_tokens_neox': 663, 'n_words': 147}