Ejemplo n.º 1
0
KisBrush::KisBrush(const KisBrush& rhs)
    : KoResource(QString())
    , KisShared()
    , d(new Private)
{
    setBrushTipImage(rhs.brushTipImage());
    d->brushType = rhs.d->brushType;
    d->width = rhs.d->width;
    d->height = rhs.d->height;
    d->spacing = rhs.d->spacing;
    d->hotSpot = rhs.d->hotSpot;
    d->hasColor = rhs.d->hasColor;
    d->angle = rhs.d->angle;
    d->scale = rhs.d->scale;
    d->autoSpacingActive = rhs.d->autoSpacingActive;
    d->autoSpacingCoeff = rhs.d->autoSpacingCoeff;
    setFilename(rhs.filename());

    /**
     * Be careful! The pyramid is shared between two brush objects,
     * therefore you cannot change it, only recreate! That i sthe
     * reason why it is defined as const!
     */
    d->brushPyramid = rhs.d->brushPyramid;

    // don't copy the boundary, it will be regenerated -- see bug 291910
}
Ejemplo n.º 2
0
KisBrush::KisBrush(const KisBrush& rhs)
    : KoResource("")
    , KisShared()
    , d(new Private)
{
    setBrushTipImage(rhs.brushTipImage());
    d->brushType = rhs.d->brushType;
    d->width = rhs.d->width;
    d->height = rhs.d->height;
    d->spacing = rhs.d->spacing;
    d->hotSpot = rhs.d->hotSpot;
    d->hasColor = rhs.d->hasColor;
    d->angle = rhs.d->angle;
    d->scale = rhs.d->scale;
    setFilename(rhs.filename());
    clearBrushPyramid();
    // don't copy the boundary, it will be regenerated -- see bug 291910
}