Silverlight之三维透视效果(11)

Silverlight之三维透视效果(11),第1张

概述代码下载 三维透视效果 记住以下关键点,找一些例子一看效果就明白了。 1)三维空间坐标,对象中心为坐标原点。 2)Y纵向向上为正,X横向向右为正,Z水平指向自己为正。 不用多讲看代码就明白:   <UserControl x:Class="SL.MainPage"     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentatio

代码下载

三维透视效果

记住以下关键点,找一些例子一看效果就明白了。

1)三维空间坐标,对象中心为坐标原点。

2)Y纵向向上为正,X横向向右为正,Z水平指向自己为正。

不用多讲看代码就明白:

 

<UserControl x:Class="SL.MainPage"
    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"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWIDth="400">

    <GrID x:name="LayoutRoot" Background="White">
        <Image Source="1.jpg" WIDth="200" Height="150">
            <Image.Projection >
                <!-- 三维透视效果 -->
                <!--记住以下关键点,找一些例子一看效果就明白了。
                1)三维空间坐标,对象中心为坐标原点。
                2)Y纵向向上为正,X横向向右为正,Z水平指向自己为正。-->
               
                <!-- 1.沿Y轴旋转45度-->
                <!--<PlaneProjection RotationY="45"></PlaneProjection>-->
                <!-- 2.沿X轴旋转60度-->
                <!--<PlaneProjection RotationX="60"></PlaneProjection>-->
                <!-- 3.沿Z轴旋转30度-->
                <!--<PlaneProjection RotationZ="30"></PlaneProjection>-->

                <!-- 4.沿XYZ轴综合旋转-->
                <!--<PlaneProjection RotationY="45" RotationX="60" RotationZ="30"></PlaneProjection>-->

                <!--5.默认中心点位于中对象的中线上,通过CenterOfRotationX,CenterOfRotationY,CenterOfRotationZ三个属性来改变中心位置,值范围0到1,两个极端,不是在这一侧就是那一侧,如果是0和1之间的值就按比例计算了,如0.5就是默认的中间位置。-->
                <!--<PlaneProjection RotationY="45" RotationX="60" RotationZ="30" CenterOfRotationX="0.2" CenterOfRotationY="0.6" CenterOfRotationZ="1"></PlaneProjection>-->

                <!--6.本地偏移:本地平移只是为了相对于屏幕平移-->
                <!--<PlaneProjection RotationY="45" RotationX="60" RotationZ="30" LocalOffsetX="12"  LocalOffsetY="20" LocalOffsetZ="30"></PlaneProjection>-->
                <!--7.全局偏移:全局偏就是移动屏幕坐标,左加右减,上加下减。-->
                <PlaneProjection RotationY="45" RotationX="-60" RotationZ="30" GlobalOffsetX="12"  GlobalOffsetY="20" GlobalOffsetZ="30"></PlaneProjection>
            </Image.Projection>
        </Image>
    </GrID>
</UserControl>
代码下载

总结

以上是内存溢出为你收集整理的Silverlight之三维透视效果(11)全部内容,希望文章能够帮你解决Silverlight之三维透视效果(11)所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1068188.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-26
下一篇 2022-05-26

发表评论

登录后才能评论

评论列表(0条)

保存