Bug 649665

Summary: Geometry FillRule seems to have no effect
Product: [Mono] Moonlight Reporter: Rui Craveiro <rui>
Component: xamlAssignee: Mono Bugs <mono-bugs>
Status: NEW --- QA Contact: Mono Bugs <mono-bugs>
Severity: Normal    
Priority: P5 - None    
Version: SVN   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 11.3   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Contains a working demo

Description Rui Craveiro 2010-10-27 17:17:54 UTC
Created attachment 397370 [details]
Contains a working demo

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.41 Safari/534.7

Assume the following XAML:

    <Border CornerRadius="3" BorderThickness="1" Background="Green" BorderBrush="Black" Width="100" Height="100" >
        <Border.Clip>
            <GeometryGroup FillRule="EvenOdd">
                <RectangleGeometry x:Name="rg1" Rect="0,0,90,100"/>
                <RectangleGeometry x:Name="rg2" Rect="6,0,100,10"/>
            </GeometryGroup>
        </Border.Clip>
    </Border>

If the property FillRule of the GeometryGroup would be Nonzero, then clipping defined by rg2 rectangle should be added to the clipping defined by rg1. Moonlight behaves correctly in this case.

However, when the FillRule is "EvenOdd", as it is in the example, then area defined by rg2 should be subtracted from the clipping originally defined by rg1. Moonlight is ignoring this and keeps on adding the two areas.

Reproducible: Always

Steps to Reproduce:
1. Run the TestPage.html of the demo I attach.
2.
3.
Actual Results:  
The area defined in the second rectangle was added to the clipping.

Expected Results:  
The area defined in the second rectangle to be subtracted from the clipping.