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>
结果: