其他分享
首页 > 其他分享> > 002 用代码画蜡笔小新(WPF艺术作品系列)

002 用代码画蜡笔小新(WPF艺术作品系列)

作者:互联网

利用.Net的WPF技术进行开发

视频:用代码画蜡笔小新(利用.Net的WPF技术)

成品:

XAML代码:

<Window x:Class="蜡笔小新_鱼蛋作品_.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:蜡笔小新_鱼蛋作品_"
        mc:Ignorable="d"
        Title="蜡笔小新(鱼蛋作品)" Height="466" Width="453">
    <Canvas>
    <Rectangle Height="52" Canvas.Left="122" Stroke="Black"  Canvas.Top="406" Width="178" HorizontalAlignment="Center" VerticalAlignment="Top" Fill="#FFD8D87D"/>
        <Rectangle Height="27" Canvas.Left="242"  Canvas.Top="386" Width="67" Fill="#FFD9213F" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Left" VerticalAlignment="Center">
            <Rectangle.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="2"/>
                    </TransformGroup>
                </Rectangle.RenderTransform></Rectangle>
        <Rectangle Height="141" Canvas.Left="144"  Canvas.Top="267" Width="150" HorizontalAlignment="Left" VerticalAlignment="Center" Fill="#FFD9213F"/>
        <Ellipse Height="191" Canvas.Left="126" Stroke="Black" Canvas.Top="231" Width="59" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Left" VerticalAlignment="Center" Fill="#FFD9213F">
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="19"/>
                    </TransformGroup>
                </Ellipse.RenderTransform></Ellipse>
        <Ellipse Height="21" Canvas.Left="158" Stroke="Black" Canvas.Top="396" Width="30" HorizontalAlignment="Left" VerticalAlignment="Center" Fill="#FF060000"/>
        <Ellipse Height="21" Canvas.Left="123" Stroke="Black" Canvas.Top="395" Width="30" HorizontalAlignment="Center" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5" Fill="#FFD9213F">
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="-18"/>
                    </TransformGroup>
                </Ellipse.RenderTransform></Ellipse>
        <Ellipse Height="21" Canvas.Left="186" Stroke="Black" Canvas.Top="395" Width="30" HorizontalAlignment="Center" VerticalAlignment="Center" Fill="#FFD9213F"/>
        <Rectangle Height="15" Canvas.Left="240" Stroke="Black" Canvas.Top="401" Width="53" Fill="#FFD9213F"/>
        <Rectangle Height="15" Canvas.Left="208" Stroke="Black" Canvas.Top="398" Width="36" HorizontalAlignment="Center" VerticalAlignment="Center" Fill="#FFD9213F"/>
        <Rectangle Height="15" Canvas.Left="137" Stroke="Black" Canvas.Top="398" Width="36" HorizontalAlignment="Left" VerticalAlignment="Center" Fill="#FFD9213F"/>
        <Ellipse Height="22" Canvas.Left="284" Stroke="Black" Canvas.Top="297" Width="54" RenderTransformOrigin="0.5,0.5">
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="-23"/>
                    </TransformGroup>
                </Ellipse.RenderTransform></Ellipse>
        <Ellipse Height="22" Canvas.Left="284" Stroke="Black" Canvas.Top="317" Width="54" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Center" VerticalAlignment="Top" Fill="#FFD9213F">
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="-23"/>
                    </TransformGroup>
                </Ellipse.RenderTransform></Ellipse>
        <Ellipse Height="30" Canvas.Left="287" Stroke="Black" Canvas.Top="340" Width="43" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Left" VerticalAlignment="Center">
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="-23"/>
                    </TransformGroup>
                </Ellipse.RenderTransform></Ellipse>
        <Ellipse Height="30" Canvas.Left="286" Stroke="Black" Canvas.Top="366.029" Width="44" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Center" VerticalAlignment="Top" Fill="#FFD9213F">
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="-81"/>
                    </TransformGroup>
                </Ellipse.RenderTransform></Ellipse>
        <Ellipse Height="34" Canvas.Left="266" Stroke="Black" Canvas.Top="315" Width="20" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Center" VerticalAlignment="Top">
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="44"/>
                    </TransformGroup>
                </Ellipse.RenderTransform></Ellipse>
        <Ellipse Height="24" Canvas.Left="264" Stroke="Black" Canvas.Top="335" Width="28" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Center" VerticalAlignment="Center">
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="50"/>
                    </TransformGroup>
                </Ellipse.RenderTransform></Ellipse>
        <Ellipse Height="24" Canvas.Left="267" Stroke="Black" Canvas.Top="361" Width="30" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Left" VerticalAlignment="Top">
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="56"/>
                    </TransformGroup>
                </Ellipse.RenderTransform></Ellipse>
        <Rectangle Height="20" Canvas.Left="322" Stroke="Black" Canvas.Top="323" Width="12" Fill="#FFD9213F"/>
        <Rectangle Height="20" Canvas.Left="322" Stroke="Black" Canvas.Top="301" Width="12" HorizontalAlignment="Center" VerticalAlignment="Top"/>
        <Rectangle Height="20" Canvas.Left="319" Stroke="Black" Canvas.Top="341" Width="12" HorizontalAlignment="Center" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5">
            <Rectangle.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="13"/>
                    </TransformGroup>
                </Rectangle.RenderTransform></Rectangle>
        <Rectangle Height="20" Canvas.Left="315" Stroke="Black" Canvas.Top="360" Width="12" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Center" VerticalAlignment="Center" Fill="#FFD9213F">
            <Rectangle.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="11"/>
                    </TransformGroup>
                </Rectangle.RenderTransform></Rectangle>
        <Rectangle Height="20" Canvas.Left="311" Stroke="Black" Canvas.Top="379" Width="12" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Center" VerticalAlignment="Center" Fill="#FFD9213F">
            <Rectangle.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="11"/>
                    </TransformGroup>
                </Rectangle.RenderTransform></Rectangle>
        
        <Ellipse Height="29" Canvas.Left="295" Stroke="Black" Canvas.Top="402" Width="10" HorizontalAlignment="Left" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5" Fill="#FFFFB8A6">
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="9"/>
                    </TransformGroup>
                </Ellipse.RenderTransform></Ellipse>
        <Rectangle Height="25" Canvas.Left="310" Stroke="Black" Canvas.Top="269.806" Width="19" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Left" VerticalAlignment="Top">
            <Rectangle.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="41"/>
                    </TransformGroup>
                </Rectangle.RenderTransform></Rectangle>
        <Rectangle Height="22" Canvas.Left="315" Stroke="Black" Canvas.Top="280" Width="20" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Left" VerticalAlignment="Center" Fill="#FFD9213F">
            <Rectangle.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="-3"/>
                    </TransformGroup>
                </Rectangle.RenderTransform></Rectangle>
        <Ellipse Height="48" Canvas.Left="300" Stroke="Black" Canvas.Top="396" Width="19" HorizontalAlignment="Center" VerticalAlignment="Center" Fill="#FFFFB8A6"/>
        <Rectangle Height="76" Canvas.Left="256"  Canvas.Top="317" Width="30" HorizontalAlignment="Center" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5" Fill="#FFD9213F">
            <Rectangle.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="-1"/>
                    </TransformGroup>
                </Rectangle.RenderTransform></Rectangle>
        <Rectangle Height="23" Canvas.Left="286"  Canvas.Top="302" Width="19" RenderTransformOrigin="0.5,0.5" Fill="#FFD9213F" HorizontalAlignment="Left" VerticalAlignment="Top">
            <Rectangle.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="-40"/>
                    </TransformGroup>
                </Rectangle.RenderTransform></Rectangle>
        <Rectangle Height="23" Canvas.Left="290"  Canvas.Top="318" Width="19" RenderTransformOrigin="0.5,0.5" Fill="#FFD9213F" HorizontalAlignment="Center" VerticalAlignment="Top">
            <Rectangle.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="6"/>
                    </TransformGroup>
                </Rectangle.RenderTransform></Rectangle>
        <Rectangle Height="50" Canvas.Left="296"  Canvas.Top="329" Width="19" RenderTransformOrigin="0.5,0.5" Fill="#FFD9213F" HorizontalAlignment="Center" VerticalAlignment="Center">
            <Rectangle.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="-23"/>
                    </TransformGroup>
                </Rectangle.RenderTransform></Rectangle>
        <Rectangle Height="21" Canvas.Left="293"  Canvas.Top="347" Width="19" RenderTransformOrigin="0.5,0.5" Fill="#FFD9213F" HorizontalAlignment="Center" VerticalAlignment="Center">
            <Rectangle.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="-4"/>
                    </TransformGroup>
                </Rectangle.RenderTransform></Rectangle>
        <Rectangle Height="36" Canvas.Left="296"  Canvas.Top="359" Width="19" RenderTransformOrigin="0.5,0.5" Fill="#FFD9213F" HorizontalAlignment="Center" VerticalAlignment="Center">
            <Rectangle.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="-15"/>
                    </TransformGroup>
                </Rectangle.RenderTransform></Rectangle>
        <Rectangle Height="22" Canvas.Left="269"  Canvas.Top="348" Width="19" RenderTransformOrigin="0.5,0.5" Fill="#FFD9213F" HorizontalAlignment="Center" VerticalAlignment="Top">
            <Rectangle.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="-3"/>
                    </TransformGroup>
                </Rectangle.RenderTransform></Rectangle>
        <Rectangle Height="22" Canvas.Left="274"  Canvas.Top="372" Width="19" RenderTransformOrigin="0.5,0.5" Fill="#FFD9213F" HorizontalAlignment="Left" VerticalAlignment="Top">
            <Rectangle.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="-3"/>
                    </TransformGroup>
                </Rectangle.RenderTransform></Rectangle>
        <Rectangle Height="50" Canvas.Left="285"  Canvas.Top="262" Width="38" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Left" VerticalAlignment="Top" Fill="#FFD9213F">
            <Rectangle.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="41"/>
                    </TransformGroup>
                </Rectangle.RenderTransform></Rectangle>
        <Rectangle Height="24" Canvas.Left="314"  Canvas.Top="280" Width="20" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Center" VerticalAlignment="Top" Fill="#FFD9213F">
            <Rectangle.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="-3"/>
                    </TransformGroup>
                </Rectangle.RenderTransform></Rectangle>
        <Rectangle Height="42" Canvas.Left="302"  Canvas.Top="302" Width="31" RenderTransformOrigin="0.5,0.5" Fill="#FFD9213F" HorizontalAlignment="Left" VerticalAlignment="Center">
            <Rectangle.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="1"/>
                    </TransformGroup>
                </Rectangle.RenderTransform></Rectangle>
        <Rectangle Height="55" Canvas.Left="302"  Canvas.Top="339" Width="25" RenderTransformOrigin="0.5,0.5" Fill="#FFD9213F" HorizontalAlignment="Left" VerticalAlignment="Center">
            
            
            <Rectangle.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="13"/>
                    </TransformGroup>
                </Rectangle.RenderTransform></Rectangle>
        <Rectangle Height="5" Canvas.Left="332"  Canvas.Top="316" Width="2" RenderTransformOrigin="0.5,0.5" Fill="#FFD9213F" HorizontalAlignment="Center" VerticalAlignment="Center">
            <Rectangle.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="1"/>
                    </TransformGroup>
                </Rectangle.RenderTransform></Rectangle>
        <Ellipse Height="25" Canvas.Left="297" Fill="#FFFFB8A6" Canvas.Top="403" Width="10" HorizontalAlignment="Center" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5">
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="5"/>
                    </TransformGroup>
                </Ellipse.RenderTransform></Ellipse>
        <Ellipse Height="23" Canvas.Left="118" Fill="#FFD9213F" Canvas.Top="391" Width="40" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Center" VerticalAlignment="Center">
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="-15"/>
                    </TransformGroup>
                </Ellipse.RenderTransform></Ellipse>
        <Ellipse Height="23" Canvas.Left="155" Fill="#FFD9213F" Canvas.Top="392" Width="36" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Left" VerticalAlignment="Center">
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="-3"/>
                    </TransformGroup>
                </Ellipse.RenderTransform></Ellipse>
        <Ellipse Height="23" Canvas.Left="182" Fill="#FFD9213F" Canvas.Top="391" Width="41" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Left" VerticalAlignment="Top">
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="1"/>
                    </TransformGroup>
                </Ellipse.RenderTransform></Ellipse>
        <Rectangle Height="147" Canvas.Left="152"  Canvas.Top="258" Width="35" Fill="#FFD9213F" HorizontalAlignment="Left" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5">
            <Rectangle.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="13"/>
                    </TransformGroup>
                </Rectangle.RenderTransform></Rectangle>
        <Rectangle Height="23" Canvas.Left="219"  Canvas.Top="389" Width="44" Fill="#FFD9213F" HorizontalAlignment="Center" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5">
            <Rectangle.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="2"/>
                    </TransformGroup>
                </Rectangle.RenderTransform></Rectangle>
        <Rectangle Height="14" Canvas.Left="242"  Canvas.Top="400" Width="54" Fill="#FFD9213F" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Center" VerticalAlignment="Center">
            <Rectangle.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="2"/>
                    </TransformGroup>
                </Rectangle.RenderTransform></Rectangle>
        <Ellipse Height="107" Canvas.Left="54" Stroke="Black" Canvas.Top="126" Width="198" HorizontalAlignment="Center" VerticalAlignment="Center" Fill="#FFD9213F"/>
        <Ellipse HorizontalAlignment="Left" Height="153" Stroke="Black" VerticalAlignment="Center" Width="223" Fill="#FFFFBDA7" Canvas.Left="86.333" Canvas.Top="141"/>
        <Ellipse HorizontalAlignment="Left" Height="40" Margin="193,248,0,0" Stroke="Black" VerticalAlignment="Top" Width="143" RenderTransformOrigin="0.5,0.5" Fill="#FFFFBDA7">
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="-13"/>
                    </TransformGroup>
                </Ellipse.RenderTransform></Ellipse>
        <Ellipse HorizontalAlignment="Left" Height="86" Margin="327,186,0,0" Stroke="Black" VerticalAlignment="Top" Width="59" Fill="#FFFFBDA7"/>
        <Ellipse Stroke="Black" HorizontalAlignment="Left" Height="50" Margin="288,212,0,0"  VerticalAlignment="Top" Width="93" RenderTransformOrigin="0.5,0.5" Fill="#FFFFBDA7">
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="36"/>
                    </TransformGroup>
                </Ellipse.RenderTransform></Ellipse>
        <Ellipse HorizontalAlignment="Left" Height="132" Margin="153,90,0,0" Stroke="Black" VerticalAlignment="Top" Width="198" RenderTransformOrigin="0.5,0.5" Fill="#FFFFBDA7">
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="11"/>
                    </TransformGroup>
                </Ellipse.RenderTransform></Ellipse>
        <Ellipse HorizontalAlignment="Center" Height="73" Stroke="Black" VerticalAlignment="Top" Width="30" RenderTransformOrigin="0.5,0.5" Fill="#FFFFBDA7" Canvas.Left="329.178" Canvas.Top="142">
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="-11"/>
                    </TransformGroup>
                </Ellipse.RenderTransform></Ellipse>
        <Ellipse HorizontalAlignment="Left" Height="39" Margin="137,132,0,0" Stroke="Black" VerticalAlignment="Top" Width="20" RenderTransformOrigin="0.5,0.5" Fill="#FFFFBDA7">
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="23"/>
                    </TransformGroup>
                </Ellipse.RenderTransform></Ellipse>
        
        
        <Ellipse HorizontalAlignment="Left" Height="18" Margin="291,230,0,0"  VerticalAlignment="Top" Width="18" Fill="#FFFFBDA7"/>
        <Ellipse HorizontalAlignment="Left" Height="18" Margin="321,199,0,0"  VerticalAlignment="Top" Width="18" Fill="#FFFFBDA7"/>
        <Rectangle HorizontalAlignment="Left" Height="128" Margin="144,134,0,0"  VerticalAlignment="Top" Width="193" Fill="#FFFFBDA7"/>
        <Ellipse HorizontalAlignment="Left" Height="43" Margin="179,250,0,0"  VerticalAlignment="Top" Width="58" Fill="#FFFFBDA7"/>
        <Ellipse HorizontalAlignment="Left" Height="26" Margin="134,149,0,0"  VerticalAlignment="Top" Width="18" RenderTransformOrigin="0.5,0.5" Fill="#FFFFBDA7">
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="20"/>
                    </TransformGroup>
                </Ellipse.RenderTransform></Ellipse>
        <Ellipse HorizontalAlignment="Center" Height="17"  VerticalAlignment="Center" Width="14"  Fill="#FFFFBDA7" Canvas.Left="330" Canvas.Top="141"/>
        <Ellipse Height="81" Canvas.Left="171" Stroke="Black" Canvas.Top="88.833" Width="163" HorizontalAlignment="Left" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5" Fill="Black">
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="8"/>
                    </TransformGroup>
                </Ellipse.RenderTransform></Ellipse>
        <Ellipse Height="52" Canvas.Left="272" Stroke="Black" Canvas.Top="134" Width="108" HorizontalAlignment="Left" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5" Fill="Black">
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="55"/>
                    </TransformGroup>
                </Ellipse.RenderTransform></Ellipse>
        <Ellipse  HorizontalAlignment="Left" Height="84" Margin="327,187,0,0"  VerticalAlignment="Top" Width="58" Fill="#FFFFBDA7"/>
        <Rectangle Height="66" Canvas.Left="186"  Canvas.Top="100" Width="83"  HorizontalAlignment="Left" VerticalAlignment="Center" Fill="#FFFFBDA7">
            <Rectangle.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="6"/>
                    </TransformGroup>
                </Rectangle.RenderTransform></Rectangle>
        <Rectangle Height="67" Canvas.Left="295"  Canvas.Top="117" Width="30"  HorizontalAlignment="Center" VerticalAlignment="Center" Fill="#FFFFBDA7">
            <Rectangle.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="20"/>
                    </TransformGroup>
                </Rectangle.RenderTransform></Rectangle>
        <Rectangle Height="82" Canvas.Left="283" Canvas.Top="139" Width="41"  HorizontalAlignment="Left" VerticalAlignment="Top" Fill="#FFFFBDA7">
            <Rectangle.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="-16"/>
                    </TransformGroup>
                </Rectangle.RenderTransform></Rectangle>
        <Rectangle Height="66" Canvas.Left="263"  Canvas.Top="109" Width="40" Fill="#FFFFBDA7" HorizontalAlignment="Center" VerticalAlignment="Center">
            <Rectangle.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="14"/>
                    </TransformGroup>
                </Rectangle.RenderTransform></Rectangle>
        <Rectangle Height="66" Canvas.Left="263"  Canvas.Top="109" Width="40" Fill="#FFFFBDA7" HorizontalAlignment="Center" VerticalAlignment="Center">
            <Rectangle.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="14"/>
                    </TransformGroup>
                </Rectangle.RenderTransform></Rectangle>
        <Ellipse Height="42" Canvas.Left="171" Canvas.Top="102" Width="23" HorizontalAlignment="Center" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5" Fill="#FFFFBDA7" >
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="5"/>
                    </TransformGroup>
                </Ellipse.RenderTransform></Ellipse>
        <Path Data="M187,104 L187,100 187,98 188,97 189,96 190,95 191,94 192,93 194,93 195,93 197,94 203,102 206,108 208,114 210,119 213,125 213,130 209,136 206,137 z" Fill="Black" Height="51" Canvas.Left="187" Stroke="Black" Stretch="Fill" Canvas.Top="92" Width="38" HorizontalAlignment="Center" VerticalAlignment="Center"/>
        <Path Data="M235,134 L239,130 247,124 256,119 267,112 273,108 297,114 292,119 277,127 260,136 251,138 244.35308,141 240,140 237,139 z" Fill="Black" Height="38" Canvas.Left="235" Stroke="Black" Stretch="Fill" Canvas.Top="107" Width="62" HorizontalAlignment="Center" VerticalAlignment="Center"/>
        <Path  Stroke="Black" StrokeThickness="2" Width="68" Height="24" StrokeDashArray="0" StrokeDashCap="Round" Canvas.Left="146.667" Canvas.Top="129" Data="M 100,100 A 100,100 0 1 0 300,100" HorizontalAlignment="Left" Stretch="Fill" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5">
            <Path.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleY="-1"/>
                    <RotateTransform Angle="-4"/>
                    </TransformGroup>
                </Path.RenderTransform>
            </Path>
        <Ellipse Height="43" Canvas.Left="168" Canvas.Top="150" Width="51" HorizontalAlignment="Left" VerticalAlignment="Center" Fill="Black"/>
        
          <Path  Stroke="Black" StrokeThickness="2" Width="80" Height="32" StrokeDashArray="0" StrokeDashCap="Round" Canvas.Left="237.89" Canvas.Top="131.312"
            Data="M 100,100 A 100,100 0 1 0 300,100" Stretch="Fill" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Left" VerticalAlignment="Center">
            <Path.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleY="-1"/>
                    <SkewTransform/>
                    <RotateTransform Angle="7.18"/>
                    <TranslateTransform/>
                </TransformGroup>
            </Path.RenderTransform>
        </Path>
        
        <Ellipse Height="44" Canvas.Left="232"  Canvas.Top="154" Width="51" HorizontalAlignment="Center" VerticalAlignment="Center" Fill="Black"/>
        <Ellipse Height="17" Canvas.Left="244.667"  Canvas.Top="167.592" Width="22" HorizontalAlignment="Left" VerticalAlignment="Center" Fill="White"/>
        <Ellipse Height="17" Canvas.Left="186"  Canvas.Top="164" Width="19" HorizontalAlignment="Center" VerticalAlignment="Center" Fill="White"/>
        <Ellipse Height="33" Canvas.Left="134" Stroke="Black" Canvas.Top="244" Width="69" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Left" VerticalAlignment="Top" Fill="#FF742A3E">
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="-32"/>
                    </TransformGroup>
                </Ellipse.RenderTransform></Ellipse>
        <Ellipse Height="39" Canvas.Left="140" Stroke="Black" Canvas.Top="104" Width="14" RenderTransformOrigin="0.5,0.5" Fill="#FFFFB8A6" HorizontalAlignment="Left" VerticalAlignment="Top">
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX="1" ScaleY="1"/>
                    <SkewTransform AngleY="-1"/>
                    <RotateTransform Angle="-110"/>
                    <TranslateTransform X="6" Y="9"/>
                    </TransformGroup>
                </Ellipse.RenderTransform></Ellipse>
        <Ellipse Height="65" Canvas.Left="142" Stroke="Black" Canvas.Top="91" Width="26" Fill="#FFFFB8A6" HorizontalAlignment="Left" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5">
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX="1" ScaleY="1"/>
                    <SkewTransform AngleY="-1"/>
                    <RotateTransform Angle="-119"/>
                    <TranslateTransform X="-5" Y="-3"/>
                    </TransformGroup>
                </Ellipse.RenderTransform></Ellipse>
        <Ellipse Height="34" Canvas.Left="144" Fill="#FFFFB8A6" Canvas.Top="106" Width="11" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Left" VerticalAlignment="Top">
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX="1" ScaleY="1"/>
                    <SkewTransform AngleX="-2"/>
                    <RotateTransform Angle="61"/>
                    <TranslateTransform X="2" Y="8"/>
                    </TransformGroup>
                </Ellipse.RenderTransform></Ellipse>
                     
    </Canvas>
</Window>

 

标签:Net,XAML,002,蜡笔小新,WPF,代码
来源: https://www.cnblogs.com/zhongrongzhao/p/16286270.html