Difference between EvenOdd FillRule and NonZero FillRule : Polygon « Windows Presentation Foundation « C# / CSharp Tutorial

Home
C# / CSharp Tutorial
1.Language Basics
2.Data Type
3.Operator
4.Statement
5.String
6.struct
7.Class
8.Operator Overload
9.delegate
10.Attribute
11.Data Structure
12.Assembly
13.Date Time
14.Development
15.File Directory Stream
16.Preprocessing Directives
17.Regular Expression
18.Generic
19.Reflection
20.Thread
21.I18N Internationalization
22.LINQ
23.GUI Windows Forms
24.Windows Presentation Foundation
25.Windows Communication Foundation
26.Workflow
27.2D
28.Design Patterns
29.Windows
30.XML
31.XML LINQ
32.ADO.Net
33.Network
34.Directory Services
35.Security
36.unsafe
C# / C Sharp
C# / C Sharp by API
C# / CSharp Open Source
C# / CSharp Tutorial » Windows Presentation Foundation » Polygon 
24.89.17.Difference between EvenOdd FillRule and NonZero FillRule
<Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        TextBlock.FontSize="16">
    <Canvas.Resources>

        <!-- Define properties common to both figures. -->

        <Style x:Key="figure">
            <Setter Property="Polygon.Points"
                Value="  0   0,   0 184, 184 144, 144  24,20 120, 120 300, 280 264, 964,  0" />
            <Setter Property="Polygon.Fill"
                    Value="Blue" />
            <Setter Property="Polygon.Stroke"
                    Value="Red" />
            <Setter Property="Polygon.StrokeThickness"
                    Value="3" />
        </Style>
    </Canvas.Resources>


    <TextBlock Canvas.Left="48" Canvas.Top="24"
               Text="FillRule = EvenOdd" />

    <Polygon Style="{StaticResource figure}"
             FillRule="EvenOdd"
             Canvas.Left="48" Canvas.Top="72" />


    <TextBlock Canvas.Left="360" Canvas.Top="24"
               Text="FillRule = NonZero" />

    <Polygon Style="{StaticResource figure}"
             FillRule="NonZero"
             Canvas.Left="360" Canvas.Top="72" />
</Canvas>
WPF Difference Between Even Odd Fill Rule And Non Zero Fill Rule
24.89.Polygon
24.89.1.Polyline by PointsPolyline by Points
24.89.2.A Polygon always closes the end pointsA Polygon always closes the end points
24.89.3.Specifying points the long way with Polygon.Points tag and PointSpecifying points the long way with Polygon.Points tag and Point
24.89.4.Draw figure with 'EvenOdd' FillRuleDraw figure with 'EvenOdd' FillRule
24.89.5.Draw figure with 'NonZero' FillRuleDraw figure with 'NonZero' FillRule
24.89.6.Draw second figure with 'NonZero' FillRuleDraw second figure with 'NonZero' FillRule
24.89.7.Polygon Stretch= UniformToFillPolygon Stretch= UniformToFill
24.89.8.Polygon Stretch=UniformPolygon Stretch=Uniform
24.89.9.Star PolygonStar Polygon
24.89.10.Fill Polygon with RadialGradientBrushFill Polygon with RadialGradientBrush
24.89.11.Polygon with FillPolygon with Fill
24.89.12.Polygon Stroke color and ThicknessPolygon Stroke color and Thickness
24.89.13.Polygon Along with CanvasPolygon Along with Canvas
24.89.14.Polygon Stretch=FillPolygon Stretch=Fill
24.89.15.Polygon Stretch=NonePolygon Stretch=None
24.89.16.Star.xamlStar.xaml
24.89.17.Difference between EvenOdd FillRule and NonZero FillRuleDifference between EvenOdd FillRule and NonZero FillRule
24.89.18.Draws another triangle with a blue interior with PolygonDraws another triangle with a blue interior with Polygon
24.89.19.Non-zero fill rule with more complex shape with PolygonNon-zero fill rule with more complex shape with Polygon
24.89.20.Polygon Mouse down eventPolygon Mouse down event
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.