[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-kimageshop
Subject: [PATCH]:merging the layer below junior job
From: GAURAV Agrawal <gauravagrawal03jan () gmail ! com>
Date: 2014-02-14 19:15:59
Message-ID: CA+cBbmU1V=jErkZvhkkQi8WC9oBf1i15S0NYS68JrurrK2qqLQ () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hello,
This patch is for the file calligra/krita/image/kis_image.cc.
this patch is for Bug-322951.
This patch solves the merging problem of
1)merging an alpha-disabled layer over an alpha-enabled layer
2)merging an alpha-disabled layer over an alpha-disabled layer
Please inform me if it gives any issues.
Thanks
Gaurav
[Attachment #5 (text/html)]
<div dir="ltr"><div><div><div><div><div><div><div>Hello,<br><br></div>This patch is \
for the file calligra/krita/image/kis_image.cc.<br><br></div><div>this patch is for \
Bug-322951.<br></div>This patch solves the merging problem of <br> \
<br></div>1)merging an alpha-disabled layer over an alpha-enabled \
layer<br></div>2)merging an alpha-disabled layer over an alpha-disabled \
layer<br><br></div>Please inform me if it gives any issues.<br><br></div>Thanks<br> \
<br></div>Gaurav<br><div><div><div><br><br><br><br></div></div></div></div>
--f46d044280c0efeb7704f2627738--
["patchjjmerge.diff" (text/plain)]
--- kis_image_orig.cc 2014-02-14 06:20:59.179312710 +0530
+++ kis_image.cc 2014-02-15 00:21:43.459774073 +0530
@@ -950,6 +950,7 @@ KisLayerSP KisImage::mergeDown(KisLayerS
//Copy the pixels of previous layer with their actual alpha value
prevLayer->disableAlphaChannel(false);
+
gc.setChannelFlags(prevLayer->channelFlags());
gc.setCompositeOp(mergedDevice->colorSpace()->compositeOp(prevLayer->compositeOpId()));
gc.setOpacity(prevLayer->opacity());
@@ -960,7 +961,10 @@ KisLayerSP KisImage::mergeDown(KisLayerS
prevLayer->disableAlphaChannel(prevAlphaDisabled);
//Paint the pixels of the current layer, using their actual alpha value
+ if(alphaDisabled==prevAlphaDisabled)
+ {
layer->disableAlphaChannel(false);
+ }
gc.setChannelFlags(layer->channelFlags());
gc.setCompositeOp(mergedDevice->colorSpace()->compositeOp(layer->compositeOpId()));
gc.setOpacity(layer->opacity());
@@ -978,7 +982,10 @@ KisLayerSP KisImage::mergeDown(KisLayerS
//Paint layer on the copy
KisPainter gc(mergedDevice);
+ if(alphaDisabled==prevAlphaDisabled)
+ {
layer->disableAlphaChannel(false);
+ }
gc.setChannelFlags(layer->channelFlags());
gc.setCompositeOp(mergedDevice->colorSpace()->compositeOp(layer->compositeOpId()));
gc.setOpacity(layer->opacity());
_______________________________________________
Krita mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic