Bug 649665 - Geometry FillRule seems to have no effect
Summary: Geometry FillRule seems to have no effect
Status: NEW
Alias: None
Product: Moonlight
Classification: Mono
Component: xaml (show other bugs)
Version: SVN
Hardware: x86-64 openSUSE 11.3
: P5 - None : Normal
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-27 17:17 UTC by Rui Craveiro
Modified: 2011-08-22 08:56 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Contains a working demo (342.69 KB, application/x-gzip)
2010-10-27 17:17 UTC, Rui Craveiro
Details

Note You need to log in before you can comment on or make changes to this bug.
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.