WPF 图片围绕中心点旋转

发布时间 2023-12-26 16:44:41作者: 搬砖的L先生


<Image.RenderTransform>



</Image.RenderTransform>
<Image.Triggers>







</Image.Triggers>

  <Image.Source>
      <DrawingImage>
          <DrawingImage.Drawing>
              <DrawingGroup>
                  <DrawingGroup x:Name="DrawingLayer">
                      <DrawingGroup.ClipGeometry>
                          <RectangleGeometry Rect="0,0,213,214" />
                      </DrawingGroup.ClipGeometry>
                      <GeometryDrawing Brush="#FF416FCF">
                          <GeometryDrawing.Geometry>
                              <PathGeometry Figures="M101.416,5.63751C101.416,2.87609 103.655,0.637512 106.416,0.637512 165.133,0.637512 212.733,48.2374 212.733,106.955 212.733,109.716 210.495,111.955 207.733,111.955 204.972,111.955 202.733,109.716 202.733,106.955 202.733,53.7603 159.611,10.6375 106.416,10.6375 103.655,10.6375 101.416,8.39894 101.416,5.63751z M5.09863,101.955C7.86006,101.955 10.0986,104.193 10.0986,106.955 10.0986,160.15 53.2214,203.272 106.416,203.272 109.177,203.272 111.416,205.511 111.416,208.272 111.416,211.034 109.177,213.272 106.416,213.272 47.6985,213.272 0.0986328,165.672 0.0986328,106.955 0.0986328,104.193 2.33721,101.955 5.09863,101.955z" FillRule="EvenOdd" />
                          </GeometryDrawing.Geometry>
                      </GeometryDrawing>
                  </DrawingGroup>
              </DrawingGroup>
          </DrawingImage.Drawing>
      </DrawingImage>
  </Image.Source>