• Silverlight MatrixTransform理解


    MatrixTransform的六个点如下图,这是本人的理解,有错误的请高手指明哈。。。

    实例:

    <Grid x:Name="LayoutRoot" Background="White">
            <Rectangle Width="200" Height="200" Stroke="Black" StrokeThickness="2">
                <Rectangle.Fill>
                    <LinearGradientBrush>
                        <GradientStop Offset="0.0" Color="White"/>
                        <GradientStop Offset="1.0" Color="Black"/>
                    </LinearGradientBrush>
                </Rectangle.Fill>
                <Rectangle.RenderTransform>
                    <MatrixTransform>
                        <MatrixTransform.Matrix>
                            <Matrix OffsetX="-50" OffsetY="100" M12="-0.5"/>
                        </MatrixTransform.Matrix>
                    </MatrixTransform>
                </Rectangle.RenderTransform>
            </Rectangle>
            <Rectangle Width="200" Height="200" Stroke="Black" StrokeThickness="2">
                <Rectangle.Fill>
                    <LinearGradientBrush>
                        <GradientStop Offset="0.0" Color="White"/>
                        <GradientStop Offset="1.0" Color="Black"/>
                    </LinearGradientBrush>
                </Rectangle.Fill>
                <Rectangle.RenderTransform>
                    <MatrixTransform>
                        <MatrixTransform.Matrix>
                            <Matrix OffsetX="150" OffsetY="0" M12="0.5"/>
                        </MatrixTransform.Matrix>
                    </MatrixTransform>
                </Rectangle.RenderTransform>
            </Rectangle>
            <Rectangle Width="200" Height="200" Stroke="Black" StrokeThickness="2">
                <Rectangle.Fill>
                    <LinearGradientBrush>
                        <GradientStop Offset="0.0" Color="White"/>
                        <GradientStop Offset="1.0" Color="Black"/>
                    </LinearGradientBrush>
                </Rectangle.Fill>
                <Rectangle.RenderTransform>
                    <MatrixTransform>
                        <MatrixTransform.Matrix>
                            <Matrix OffsetX="150" OffsetY="200" M21="-1" M22="0.5" M12="0.5"/>
                        </MatrixTransform.Matrix>
                    </MatrixTransform>
                </Rectangle.RenderTransform>
            </Rectangle>
        </Grid>

    结果:

  • 相关阅读:
    程序命名标准规范(自定义与其他标准无关)
    asp.net(C#)excel导入导出类
    CSS 技巧
    sql server 更改端口之后的登入方式
    日志插件 log4net 的使用
    js动态调用方法
    mongodb
    Spring 之工具类中注入bin
    解释:什么是云计算?
    当 ADO.NET 遇上 dynamic
  • 原文地址:https://www.cnblogs.com/KimhillZhang/p/2719247.html
Copyright © 2020-2023  润新知