Plane projection and scale causing bluring in silverlight

Posted by Andy on Stack Overflow See other posts from Stack Overflow or by Andy
Published on 2010-03-16T11:06:00Z Indexed on 2010/03/16 11:06 UTC
Read the original article Hit count: 536

Filed under:
|
|
|
|

Ok,

So I've tried to make an application which relies on images being scaled by an individual factor. These images are then able to be turned over, but the use of an animation working on the ProjectionPlane rotation.

The problem comes around when an image is both scaled and rotated. For some reason it starts bluring, where a non scaled image doesn't blur.

Also, if you look at the example image below (top is scaled and rotated, bottom is rotated) the projection of the top one doesn't even seem right. Its too horizontal.

http://img43.imageshack.us/img43/5923/testimages.png

This this the code for the test app:

<UserControl x:Class="SilverlightApplication1.Page"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Width="400" Height="300">
    <Canvas x:Name="LayoutRoot" Background="White">

            <Border Canvas.Top="25" Canvas.Left="50">

                <Border.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="3" ScaleY="3" />
                    </TransformGroup>
                </Border.RenderTransform>

                <Border.Projection>
                    <PlaneProjection RotationY="45"/>
                </Border.Projection>

                <Image Source="bw-test-pattern.jpg" Width="50" Height="40"/>
            </Border>

            <Border Canvas.Top="150" Canvas.Left="50">
                <Border.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="1" ScaleY="1" />
                    </TransformGroup>
                </Border.RenderTransform>

                <Border.Projection>
                    <PlaneProjection RotationY="45"/>
                </Border.Projection>

                <Image Source="bw-test-pattern.jpg" Width="150" Height="120"/>
            </Border>

    </Canvas>
</UserControl>

So if anyone could possible shed any light on why this may be happening, I'd very much appreciate it. Suggestions also welcome! :)

© Stack Overflow or respective owner

Related posts about Silverlight

Related posts about c#