首页 > 其他分享 >WPF Path GeometryCombineMode Union, Exclude,Intersect,Xor

WPF Path GeometryCombineMode Union, Exclude,Intersect,Xor

时间:2024-06-15 22:12:32浏览次数:14  
标签:GeometryCombineMode Xor Union Intersect Exclude Path

union

<Window x:Class="WpfApp172.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WpfApp172"
        mc:Ignorable="d" WindowState="Maximized"
        Title="MainWindow" Height="450" Width="800">
    <Grid>
        <Path Stroke="Black" StrokeThickness="10" Fill="Red">
            <Path.Data>
                <CombinedGeometry GeometryCombineMode="Union">
                    <CombinedGeometry.Geometry1>
                        <EllipseGeometry RadiusX="400" RadiusY="400"
                                         Center="450,450"/>
                    </CombinedGeometry.Geometry1>
                    <CombinedGeometry.Geometry2>
                        <EllipseGeometry RadiusX="400" RadiusY="400"
                                         Center="800,450"/>
                    </CombinedGeometry.Geometry2>
                </CombinedGeometry>
            </Path.Data>
        </Path>
    </Grid>
</Window>

 

 

 

 

Exclude

 

<Window x:Class="WpfApp172.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WpfApp172"
        mc:Ignorable="d" WindowState="Maximized"
        Title="MainWindow" Height="450" Width="800">
    <Grid>
        <Path Stroke="Black" StrokeThickness="10" Fill="Red">
            <Path.Data>
                <CombinedGeometry GeometryCombineMode="Exclude">
                    <CombinedGeometry.Geometry1>
                        <EllipseGeometry RadiusX="400" RadiusY="400"
                                         Center="450,450"/>
                    </CombinedGeometry.Geometry1>
                    <CombinedGeometry.Geometry2>
                        <EllipseGeometry RadiusX="400" RadiusY="400"
                                         Center="800,450"/>
                    </CombinedGeometry.Geometry2>
                </CombinedGeometry>
            </Path.Data>
        </Path>
    </Grid>
</Window>

 

 

Intersect

<Window x:Class="WpfApp172.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WpfApp172"
        mc:Ignorable="d" WindowState="Maximized"
        Title="MainWindow" Height="450" Width="800">
    <Grid>
        <Path Stroke="Black" StrokeThickness="10" Fill="Red">
            <Path.Data>
                <CombinedGeometry GeometryCombineMode="Intersect">
                    <CombinedGeometry.Geometry1>
                        <EllipseGeometry RadiusX="400" RadiusY="400"
                                         Center="450,450"/>
                    </CombinedGeometry.Geometry1>
                    <CombinedGeometry.Geometry2>
                        <EllipseGeometry RadiusX="400" RadiusY="400"
                                         Center="800,450"/>
                    </CombinedGeometry.Geometry2>
                </CombinedGeometry>
            </Path.Data>
        </Path>
    </Grid>
</Window>

 

 

Xor

<Window x:Class="WpfApp172.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WpfApp172"
        mc:Ignorable="d" WindowState="Maximized"
        Title="MainWindow" Height="450" Width="800">
    <Grid>
        <Path Stroke="Black" StrokeThickness="10" Fill="Red">
            <Path.Data>
                <CombinedGeometry GeometryCombineMode="Xor">
                    <CombinedGeometry.Geometry1>
                        <EllipseGeometry RadiusX="400" RadiusY="400"
                                         Center="450,450"/>
                    </CombinedGeometry.Geometry1>
                    <CombinedGeometry.Geometry2>
                        <EllipseGeometry RadiusX="400" RadiusY="400"
                                         Center="800,450"/>
                    </CombinedGeometry.Geometry2>
                </CombinedGeometry>
            </Path.Data>
        </Path>
    </Grid>
</Window>

 

标签:GeometryCombineMode,Xor,Union,Intersect,Exclude,Path
From: https://www.cnblogs.com/Fred1987/p/18249819

相关文章

  • XOR的艺术
    #include<iostream>#include<cstdio>#include<cstring>#include<string>#include<cmath>#include<algorithm>#include<cstdlib>#include<set>#include<map>#include<vector>#include<qu......
  • MySQL操作 UPDATE、SELECT、UNION、IN、DISTINCT
    update更新所有人的年龄加一:updateusersetage=age+1;只更新某个:updateusersetage=age+1wherename='zhangsan';select查询select*fromuser;//一般不建议使用通配符selectname,age,sexfromuser;//根据键查找selectname,age,sexfromuserwheresex='......
  • Golang-编码加密-Xor(GG)
    go语言环境搭建Golang学习日志━━下载及安装_golang下载-CSDN博客  gorunxxx.go  gobuildxxx.go 首先,cs.msf生成比特流数据. 放入xor,py脚本中进行xor加密. xor.pydefxor(shellcode,key):new_shellcode=""key_len=len(key)......
  • [ABC126F] XOR Matching 题解
    很好的构造题。题意请构造一个长度为$2^{m+1}$的序列$a$,该序列满足:$\foralli\in[1,2^{m+1}],a_i\in[0,2^m-1]$且每个数都恰好出现两次。对于任意一对$(i,j)$满足$a_i=a_j$,$a_i\oplusa_{i+1}\oplus\cdots\oplusa_{j-1}\oplusa_j=k$。$\oplus$表......
  • Mysql基础教程(14):UNION
    MySQLUNION的用法与实例在本文中,我们讨论在MySQL中对两个结果集进行UNION运算,以及UNION运算的规则。在MySQL中,UNION操作符是一个集合操作符,它用于合并【2个结果集】中的所有的行。SQL标准中定义了3个集合操作符:UNION,INTERSECT和MINUS。目前MySQL......
  • SQL--union用法
    UNION 是SQL中用于合并两个或多个 SELECT 语句结果集的操作符。这些 SELECT 语句必须选择相同数量的列,并且这些列的数据类型必须兼容。UNION 会自动去除结果集中的重复行,而如果你想要保留重复行,可以使用 UNIONALL。 UNION 的基本语法:制代码SELECT column_na......
  • D. XORificator
    D.XORificatorYouaregivenabinary(consistingonlyof0sand1s)$n\timesm$matrix.YouarealsogivenaXORificator,usingwhichyoucaninvertallthevaluesinachosenrow(i.e.replace0with1and1with0).Acolumninthematrixisconsider......
  • CF 948 DIV.2 D. XORificator
    考虑对每个设置为1且唯一那么我们发现对于所有的状态都是确定且唯一的那么我们对于每个点假设它为1且为该列唯一对于除它之外的点的状态进行存储又由于这个值过于大我们考虑使用哈希存储那么出现次数最多的值即为答案点击查看代码map<ull,int>cnt;map<ull,pii>pos;void......
  • D. XORificator
    原题链接题解一句话总结:使得\((i,j)\)内的元素为1,且为所在列的唯一一个1,需要翻转哪些行?在我看来,用了随机概率异或哈希code#include<bits/stdc++.h>#definelllonglongusingnamespacestd;mt19937_64rnd(chrono::steady_clock::now().time_since_epoch().count());......
  • 容器基础-- namespace,Cgroup 和 UnionFS
    Namespace什么是Namespace?这里的“namespace”指的是Linuxnamespace技术,它是Linux内核实现的一种隔离方案。简而言之,Linux操作系统能够为不同的进程分配不同的namespace,每个namespace都具有独立的资源分配,从而实现了进程间的隔离。如果你的Linux安装了GCC......