首页 > 其他分享 >WPF DrawingImage DrawingGroup Geometry in 2D acted as 3D

WPF DrawingImage DrawingGroup Geometry in 2D acted as 3D

时间:2024-12-28 17:52:36浏览次数:5  
标签:DrawingGroup Geometry acted 2D WPF DrawingImage

<Window x:Class="WpfApp102.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"
        WindowState="Maximized"
        WindowStyle="None"
        Background="Black"
        xmlns:local="clr-namespace:WpfApp102"
        mc:Ignorable="d"
        Title="MainWindow" Height="450" Width="800">
    <Grid>
        <Image>
            <Image.Source>
                <DrawingImage>
                    <DrawingImage.Drawing>
                        <DrawingGroup x:Name="House">
                            <GeometryDrawing x:Name="Front"
                                             Brush="Red"
                                             Geometry="M0,260 
                                             L0,600 
                                             L100,670 
                                             L110,500
                                             L190,550
                                             L190,710
                                             L300,775
                                             L300,430
                                             L150,175"/>
                            <GeometryDrawing x:Name="side"
                                             Brush="Green"
                                             Geometry="M300,430
                                             L300,775
                                             L600,600
                                             L600,260"/>
                            <GeometryDrawing x:Name="root"
                                             Brush="Blue"
                                             Geometry="M150,175
                                             L300,430
                                             L600,260
                                             L450,0"/>
                        </DrawingGroup>
                    </DrawingImage.Drawing>
                </DrawingImage>
            </Image.Source>
        </Image>
    </Grid>
</Window>

 

 

 

 

标签:DrawingGroup,Geometry,acted,2D,WPF,DrawingImage
From: https://www.cnblogs.com/Fred1987/p/18637736

相关文章

  • 学习threejs,THREE.RingGeometry 二维平面圆环几何体
    ......
  • WPF GeometryDrawing
    <Windowx:Class="WpfApp76.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.microsoft.......
  • WPF GeometryCombineMode Exclue,Intersect,Union,Xor
      <Windowx:Class="WpfApp72.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.micro......
  • Cesium-(Primitive)-(CorridorGeometry)
    CorridorGeometry效果:以下是CorridorGeometry类的构造函数属性,以表格形式展示:属性名类型默认值描述positionsArray.定义走廊中心的坐标点数组。widthnumber走廊边缘之间的距离,单位为米。ellipsoidEllipsoidEllipsoid.default用作参考的椭......
  • WPF Image Image.Source DrawingImage DrawingGroup ImageDrawing
    usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingSystem.Threading.Tasks;usingSystem.Windows;usingSystem.Windows.Controls;usingSystem.Windows.Data;usingSystem.Windows.Documents;usingSystem.Windows.Input;......
  • WPF Image Image.Source DrawingImage DrawingImage.Drawing DrawingGroup ImageDrawi
    <Windowx:Class="WpfApp57.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.microsoft.......
  • WPF Image DrawingImage Drawing GeometryDrawing GeometryDrawing.Geometry Geometry
    <Windowx:Class="WpfApp56.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.microsoft.......
  • postgreSQL安装后启动有The application server could not be contacted问题
      不得不说pgsql是真的麻烦,找问题找了几个小时才解决.直接步入主题吧首先问题如下安装后,双击启动就出现上述问题首先删除路径为c:\Users\your_name\AppData\Roaming\pgAdmin之内的所有文件和文件夹,如果找不到AppData,就把这个点开接着找到你安装pgsql的路径,......
  • 如何使用位置参数从 ROS 的 Geometry_msgs 初始化 Pose?
    在文档中,它说我可以使用“完整的字段值集,按.msg顺序”进行初始化。这是什么意思?我如何用Python和C++实现它?谢谢!使用位置参数初始化ROSGeometry_msgs的Pose是对的,ROSGeometry_msgs的Pose消息类型可以通过“完整的字段值集,按.msg顺序”进行初始......
  • 不可不知的WPF几何图形(Geometry)
    在软件行业,经常会听到一句话“文不如表,表不如图”说明了图形在软件应用中的重要性。同样在WPF开发中,为了程序美观或者业务需要,经常会用到各种个样的图形。今天以一些简单的小例子,简述WPF开发中几何图形(Geometry)相关内容,仅供学习分享使用,如有不足之处,还请指正。 什么是几何图形(G......