当前位置: 首页>>代码示例>>C++>>正文


C++ KisFilterConfiguration类代码示例

本文整理汇总了C++中KisFilterConfiguration的典型用法代码示例。如果您正苦于以下问题:C++ KisFilterConfiguration类的具体用法?C++ KisFilterConfiguration怎么用?C++ KisFilterConfiguration使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了KisFilterConfiguration类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: KisFilterConfiguration

KisFilterConfiguration* KisFilterColorToAlpha::factoryConfiguration(const KisPaintDeviceSP) const
{
    KisFilterConfiguration* config = new KisFilterConfiguration("colortoalpha", 1);
    config->setProperty("targetcolor", QColor(255, 255, 255));
    config->setProperty("threshold", 0);
    return config;
}
开发者ID:KDE,项目名称:calligra-history,代码行数:7,代码来源:kis_color_to_alpha.cpp

示例2: applyFilter

bool applyFilter(const KoColorSpace * cs,  KisFilterSP f)
{

    QImage qimage(QString(FILES_DATA_DIR) + QDir::separator() + "lena.png");

    KisPaintDeviceSP dev = new KisPaintDevice(cs);
//    dev->fill(0, 0, 100, 100, dev->defaultPixel());
    dev->convertFromQImage(qimage, "", 0, 0);

    // Get the predefined configuration from a file
    KisFilterConfiguration * kfc = f->defaultConfiguration(dev);

    QFile file(QString(FILES_DATA_DIR) + QDir::separator() + f->id() + ".cfg");
    if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
        qDebug() << "creating new file for " << f->id();
        file.open(QIODevice::WriteOnly | QIODevice::Text);
        QTextStream out(&file);
        out << kfc->toXML();
    } else {
        QString s;
        QTextStream in(&file);
        s = in.readAll();
        kfc->fromXML(s);
    }
    qDebug() << f->id() << ", " << cs->id() << ", " << cs->profile()->name();// << kfc->toXML() << "\n";

    KisConstProcessingInformation src(dev,  QPoint(0, 0), 0);
    KisProcessingInformation dst(dev, QPoint(0, 0), 0);

    f->process(src, dst, qimage.size(), kfc);

    return true;

}
开发者ID:KDE,项目名称:calligra-history,代码行数:34,代码来源:kis_crash_filter_test.cpp

示例3: KisFilterConfiguration

KisFilterConfiguration* KisCubismFilter::factoryConfiguration(const KisPaintDeviceSP) const
{
    KisFilterConfiguration* config = new KisFilterConfiguration(id().id(), 1);
    config->setProperty("tileSize", 10);
    config->setProperty("tileSaturation", 10);
    return config;
}
开发者ID:KDE,项目名称:calligra-history,代码行数:7,代码来源:kis_cubism_filter.cpp

示例4: KisFilterConfiguration

KisFilterConfiguration * KisSimpleNoiseReducer::factoryConfiguration(const KisPaintDeviceSP) const
{
    KisFilterConfiguration* config = new KisFilterConfiguration(id().id(), 0);
    config->setProperty("threshold", 15);
    config->setProperty("windowsize", 1);
    return config;
}
开发者ID:crayonink,项目名称:calligra-2,代码行数:7,代码来源:kis_simple_noise_reducer.cpp

示例5: KisFilterConfiguration

KisFilterConfiguration* KisPixelizeFilter::factoryConfiguration(const KisPaintDeviceSP) const
{
    KisFilterConfiguration* config = new KisFilterConfiguration("pixelize", 1);
    config->setProperty("pixelWidth", 10);
    config->setProperty("pixelHeight", 10);
    return config;
}
开发者ID:abhishekmurthy,项目名称:Calligra,代码行数:7,代码来源:kis_pixelize_filter.cpp

示例6: KisFilterConfiguration

KisFilterConfiguration* KisOilPaintFilter::factoryConfiguration(const KisPaintDeviceSP) const
{
    KisFilterConfiguration* config = new KisFilterConfiguration("oilpaint", 1);
    config->setProperty("brushSize", 1);
    config->setProperty("smooth", 30);
    return config;
}
开发者ID:crayonink,项目名称:calligra-2,代码行数:7,代码来源:kis_oilpaint_filter.cpp

示例7: KisFilterConfiguration

KisPropertiesConfiguration* KisWdgColorToAlpha::configuration() const
{
    KisFilterConfiguration* config = new KisFilterConfiguration("colortoalpha", 1);
    config->setProperty("targetcolor", widget()->colorSelector->color());
    config->setProperty("threshold", widget()->intThreshold->value());
    return config;
}
开发者ID:KDE,项目名称:calligra-history,代码行数:7,代码来源:kis_wdg_color_to_alpha.cpp

示例8: qimage

bool KisCrashFilterTest::applyFilter(const KoColorSpace * cs,  KisFilterSP f)
{

    QImage qimage(QString(FILES_DATA_DIR) + QDir::separator() + "carrot.png");

    KisPaintDeviceSP dev = new KisPaintDevice(cs);
//    dev->fill(0, 0, 100, 100, dev->defaultPixel());
    dev->convertFromQImage(qimage, 0, 0, 0);

    // Get the predefined configuration from a file
    KisFilterConfiguration * kfc = f->defaultConfiguration(dev);

    QFile file(QString(FILES_DATA_DIR) + QDir::separator() + f->id() + ".cfg");
    if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
        dbgKrita << "creating new file for " << f->id();
        file.open(QIODevice::WriteOnly | QIODevice::Text);
        QTextStream out(&file);
        out.setCodec("UTF-8");
        out << kfc->toXML();
    } else {
        QString s;
        QTextStream in(&file);
        in.setCodec("UTF-8");
        s = in.readAll();
        kfc->fromXML(s);
    }
    dbgKrita << f->id() << ", " << cs->id() << ", " << cs->profile()->name();// << kfc->toXML() << "\n";

    f->process(dev, QRect(QPoint(0,0), qimage.size()), kfc);

    return true;

}
开发者ID:ChrisJong,项目名称:krita,代码行数:33,代码来源:kis_crash_filter_test.cpp

示例9: KisFilterConfiguration

KisFilterConfiguration* KisUnsharpFilter::factoryConfiguration(const KisPaintDeviceSP) const
{
    KisFilterConfiguration* config = new KisFilterConfiguration(id().id(), 1);
    config->setProperty("halfSize", 5);
    config->setProperty("amount", 0.5);
    config->setProperty("threshold", 10);
    return config;
}
开发者ID:abhishekmurthy,项目名称:Calligra,代码行数:8,代码来源:kis_unsharp_filter.cpp

示例10: KisFilterConfiguration

KisFilterConfiguration* KisRainDropsFilter::factoryConfiguration(const KisPaintDeviceSP) const
{
    KisFilterConfiguration* config = new KisFilterConfiguration("raindrops", 1);
    config->setProperty("dropsize", 80);
    config->setProperty("number", 80);
    config->setProperty("fishEyes", 30);
    return config;
}
开发者ID:KDE,项目名称:calligra-history,代码行数:8,代码来源:kis_raindrops_filter.cpp

示例11: KisFilterConfiguration

KisFilterConfiguration* KisMotionBlurFilter::factoryConfiguration(const KisPaintDeviceSP) const
{
    KisFilterConfiguration* config = new KisFilterConfiguration(id().id(), 1);
    config->setProperty("blurAngle", 0);
    config->setProperty("blurLength", 5);

    return config;
}
开发者ID:abhishekmurthy,项目名称:Calligra,代码行数:8,代码来源:kis_motion_blur_filter.cpp

示例12: KisFilterConfiguration

KisFilterConfiguration* KisLensBlurFilter::factoryConfiguration(const KisPaintDeviceSP) const
{
    KisFilterConfiguration* config = new KisFilterConfiguration(id().id(), 1);
    config->setProperty("irisShape", "Pentagon (5)");
    config->setProperty("irisRadius", 5);
    config->setProperty("irisRotation", 0);

    return config;
}
开发者ID:abhishekmurthy,项目名称:Calligra,代码行数:9,代码来源:kis_lens_blur_filter.cpp

示例13: KisFilterConfiguration

void KisFilterConfigurationTest::testCreation()
{
    KisFilterConfiguration * kfc = new KisFilterConfiguration("test", 1);
    QVERIFY2(kfc != 0,  "Could not create test filter configuration");
    QCOMPARE(kfc->version(), 1);
    QCOMPARE(kfc->name(), QString("test"));

    delete kfc;
}
开发者ID:,项目名称:,代码行数:9,代码来源:

示例14: KisFilterConfiguration

KisFilterConfiguration* KisGaussianBlurFilter::factoryConfiguration(const KisPaintDeviceSP) const
{
    KisFilterConfiguration* config = new KisFilterConfiguration(id().id(), 1);
    config->setProperty("horizRadius", 5);
    config->setProperty("vertRadius", 5);
    config->setProperty("lockAspect", true);

    return config;
}
开发者ID:abhishekmurthy,项目名称:Calligra,代码行数:9,代码来源:kis_gaussian_blur_filter.cpp

示例15: KisFilterConfiguration

KisFilterConfiguration* KisHSVAdjustmentFilter::factoryConfiguration(const KisPaintDeviceSP) const
{
    KisFilterConfiguration* config = new KisFilterConfiguration(id().id(), 1);
    config->setProperty("h", 0);
    config->setProperty("s", 0);
    config->setProperty("v", 0);
    config->setProperty("type", 1);
    config->setProperty("colorize", false);
    return config;
}
开发者ID:abhishekmurthy,项目名称:Calligra,代码行数:10,代码来源:kis_hsv_adjustment_filter.cpp


注:本文中的KisFilterConfiguration类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。