예제 #1
0
GrayU16ColorSpace ::GrayU16ColorSpace(KoColorProfile *p) :
        LcmsColorSpace<GrayU16Traits>("GRAYU16", i18n("Grayscale (16-bit integer/channel)"), TYPE_GRAY_16, cmsSigGrayData, p)
{
    addChannel(new KoChannelInfo(i18n("Gray"), 0, 0, KoChannelInfo::COLOR, KoChannelInfo::UINT16));

    init();

    addCompositeOp(new KoCompositeOpOver<GrayU16Traits>(this));
    addCompositeOp(new KoCompositeOpErase<GrayU16Traits>(this));
}
예제 #2
0
RgbU16ColorSpace::RgbU16ColorSpace(const QString &name, KoColorProfile *p) :
    LcmsColorSpace<KoBgrU16Traits>(colorSpaceId(), name, TYPE_BGRA_16, cmsSigRgbData, p)
{
    addChannel(new KoChannelInfo(i18n("Blue") , 0 * sizeof(quint16), 2, KoChannelInfo::COLOR, KoChannelInfo::UINT16, 2, QColor(0, 0, 255)));
    addChannel(new KoChannelInfo(i18n("Green"), 1 * sizeof(quint16), 1, KoChannelInfo::COLOR, KoChannelInfo::UINT16, 2, QColor(0, 255, 0)));
    addChannel(new KoChannelInfo(i18n("Red")  , 2 * sizeof(quint16), 0, KoChannelInfo::COLOR, KoChannelInfo::UINT16, 2, QColor(255, 0, 0)));
    addChannel(new KoChannelInfo(i18n("Alpha"), 3 * sizeof(quint16), 3, KoChannelInfo::ALPHA, KoChannelInfo::UINT16, 2));
    init();

    addStandardCompositeOps<KoBgrU16Traits>(this);

    addCompositeOp(new RgbCompositeOpIn<KoBgrU16Traits>(this));
    addCompositeOp(new RgbCompositeOpOut<KoBgrU16Traits>(this));
    addCompositeOp(new RgbCompositeOpBumpmap<KoBgrU16Traits>(this));
}
예제 #3
0
KoAlphaColorSpace::KoAlphaColorSpace() :
        KoColorSpaceAbstract<AlphaU8Traits>("ALPHA", i18n("Alpha mask"))
{
    addChannel(new KoChannelInfo(i18n("Alpha"), 0, 0, KoChannelInfo::ALPHA, KoChannelInfo::UINT8));

    m_compositeOps << new KoCompositeOpOver<AlphaU8Traits>(this)
            << new CompositeClear(this)
            << new KoCompositeOpErase<AlphaU8Traits>(this)
            << new CompositeSubtract(this)
            << new CompositeMultiply(this)
            << new KoCompositeOpAlphaDarken<AlphaU8Traits>(this);

    foreach(KoCompositeOp *op, m_compositeOps) {
        addCompositeOp(op);
    }
예제 #4
0
RgbU16ColorSpace::RgbU16ColorSpace(KoColorProfile *p) :
        LcmsColorSpace<KoRgbU16Traits>(colorSpaceId(), i18n("RGB (16-bit integer/channel)"),  TYPE_BGRA_16, icSigRgbData, p)
{
    addChannel(new KoChannelInfo(i18n("Red"),   2*sizeof(quint16), 2, KoChannelInfo::COLOR, KoChannelInfo::UINT16, 2, QColor(255, 0, 0)));
    addChannel(new KoChannelInfo(i18n("Green"), 1*sizeof(quint16), 1, KoChannelInfo::COLOR, KoChannelInfo::UINT16, 2, QColor(0, 255, 0)));
    addChannel(new KoChannelInfo(i18n("Blue"),  0*sizeof(quint16), 0, KoChannelInfo::COLOR, KoChannelInfo::UINT16, 2, QColor(0, 0, 255)));
    addChannel(new KoChannelInfo(i18n("Alpha"), 3*sizeof(quint16), 3, KoChannelInfo::ALPHA, KoChannelInfo::UINT16, 2));
    init();

    addStandardCompositeOps<KoRgbU16Traits>(this);

    addCompositeOp(new RgbCompositeOpDarken<KoRgbU16Traits>(this));
    addCompositeOp(new RgbCompositeOpLighten<KoRgbU16Traits>(this));
    addCompositeOp(new RgbCompositeOpHue<KoRgbU16Traits>(this));
    addCompositeOp(new RgbCompositeOpSaturation<KoRgbU16Traits>(this));
    addCompositeOp(new RgbCompositeOpValue<KoRgbU16Traits>(this));
    addCompositeOp(new RgbCompositeOpColor<KoRgbU16Traits>(this));
    addCompositeOp(new RgbCompositeOpIn<KoRgbU16Traits>(this));
    addCompositeOp(new RgbCompositeOpOut<KoRgbU16Traits>(this));
    addCompositeOp(new RgbCompositeOpDiff<KoRgbU16Traits>(this));
    addCompositeOp(new RgbCompositeOpBumpmap<KoRgbU16Traits>(this));
//     addCompositeOp(new RgbCompositeOpClear<KoRgbU16Traits>(this));
    addCompositeOp(new RgbCompositeOpDissolve<KoRgbU16Traits>(this));
}
예제 #5
0
KisPainterlyOverlayColorSpace::KisPainterlyOverlayColorSpace(const QString &id, const QString &name)
        : KoIncompleteColorSpace<PainterlyOverlayFloatTraits>(id, name, KoColorSpaceRegistry::instance()->rgb16("")), d(new Private)
{
    addChannel(new KoChannelInfo(i18n("Adsorbency"),
                                 PainterlyOverlayFloatTraits::adsorbency_pos * sizeof(float),
                                 KoChannelInfo::SUBSTRATE,
                                 KoChannelInfo::FLOAT32,
                                 sizeof(float),
                                 QColor(255, 0, 0)));

    addChannel(new KoChannelInfo(i18n("Gravity"),
                                 PainterlyOverlayFloatTraits::gravity_pos * sizeof(float),
                                 KoChannelInfo::SUBSTRATE,
                                 KoChannelInfo::FLOAT32,
                                 sizeof(float),
                                 QColor(255, 0, 0)));

    addChannel(new KoChannelInfo(i18n("Mixability"),
                                 PainterlyOverlayFloatTraits::mixability_pos * sizeof(float),
                                 KoChannelInfo::SUBSTANCE,
                                 KoChannelInfo::FLOAT32,
                                 sizeof(float),
                                 QColor(255, 0, 0)));

    addChannel(new KoChannelInfo(i18n("Height"),
                                 PainterlyOverlayFloatTraits::height_pos * sizeof(float),
                                 KoChannelInfo::SUBSTRATE,
                                 KoChannelInfo::FLOAT32,
                                 sizeof(float),
                                 QColor(255, 0, 0)));

    addChannel(new KoChannelInfo(i18n("Pigment Concentration"),
                                 PainterlyOverlayFloatTraits::pigment_concentration_pos * sizeof(float),
                                 KoChannelInfo::SUBSTANCE,
                                 KoChannelInfo::FLOAT32,
                                 sizeof(float),
                                 QColor(255, 0, 0)));

    addChannel(new KoChannelInfo(i18n("Viscosity"),
                                 PainterlyOverlayFloatTraits::viscosity_pos * sizeof(float),
                                 KoChannelInfo::SUBSTANCE,
                                 KoChannelInfo::FLOAT32,
                                 sizeof(float),
                                 QColor(255, 0, 0)));

    addChannel(new KoChannelInfo(i18n("Volume"),
                                 PainterlyOverlayFloatTraits::volume_pos * sizeof(float),
                                 KoChannelInfo::SUBSTANCE,
                                 KoChannelInfo::FLOAT32,
                                 sizeof(float),
                                 QColor(255, 0, 0)));

    addChannel(new KoChannelInfo(i18n("Wetness"),
                                 PainterlyOverlayFloatTraits::wetness_pos * sizeof(float),
                                 KoChannelInfo::SUBSTANCE,
                                 KoChannelInfo::FLOAT32,
                                 sizeof(float),
                                 QColor(255, 0, 0)));

    addCompositeOp(new KoCompositeOpOver<PainterlyOverlayFloatTraits>(this));
    addCompositeOp(new KoCompositeOpErase<PainterlyOverlayFloatTraits>(this));
}