Hello,<br><div class="gmail_quote"><br>To solve the shadow-overlap-other-shapes issue, I got an idea but not sure whether it is done right.<br>The problem currently is, if we add shadow to a stencil(which is a shape group), shadows to the child shape would overlap each other. Even if we put all the shadows behind the child shapes, the intersection of two blured shadows would change the weight that the outer shadow of the stencil should have.<br>
So my plan is to change something in KoShapeShadow, KoShapeGroup and KoShapeManager.<br><br>I want to introduce draw:shadow as an available style to the <draw:g> element.<br>The result to the user would be: when a group is selected, shadow will only apply to the group as a whole, if user want all the child shapes inside the group to have their own shadows, the user have to ungroup and select all the child shapes, then add shadow and re-group.<br>
<br>First something should be changed in shapeManager->selection or KoShapeShadow, so that when adding shadow to a group, shadow is only added to the top-level shape, that is the group.<br>When drawing a shadow, first check if the selected shape is a group. If it is, a clip region that capable of holding the whole group is created, then background and borders to all the child shapes are painted to the clip region in the shadow color. If blur effect is used, the clip region would be blured before painted to the canvas.<br>
<br>To decide the size of the clip region the size value to the KoShapeGroup should not be 0, if that cause a problem in other codes we can add a contentSize variant.<br><br>The idea solved the problem I met and won't change the correct alpha value to the blured shadow.<br clear="all">
<br>What do you think about it?<br><br></div>-- <br>Yue Liu<br>