本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例5: KisFilterConfiguration
KisFilterConfiguration* KisPixelizeFilter::factoryConfiguration(const KisPaintDeviceSP) const
{
KisFilterConfiguration* config = new KisFilterConfiguration("pixelize", 1);
config->setProperty("pixelWidth", 10);
config->setProperty("pixelHeight", 10);
return config;
}
示例6: KisFilterConfiguration
KisFilterConfiguration* KisOilPaintFilter::factoryConfiguration(const KisPaintDeviceSP) const
{
KisFilterConfiguration* config = new KisFilterConfiguration("oilpaint", 1);
config->setProperty("brushSize", 1);
config->setProperty("smooth", 30);
return config;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}