Blog Content

    티스토리 뷰

    41.SilverLight3 - Perspective 3D

    반응형
    Perspective 3D
    - SilverLight3 에서 새로 추가된 기능입니다. 2D 객체를 3D 객체 처럼 보여주는 기능입니다.

    Perspective 3D 속성
    RotationX,Y,Z = X, Y, Z 축 중심으로 회전 ( 회전 각도 )
    CenterOfRotationX, Y, Z = X, Y, Z 축 방향( 위치 ) 기본(가운데) : 0.5, 왼쪽 0.0, 오른쪽 1.0
    GlobalOffsetX, Y, Z = X, Y, Z축 중심으로 원하는 위치로 이동
    LocalOffsetX, Y, Z = X, Y, Z축 중심으로 원하는 위치로 이동

    MainPage.xaml

    [그림 41-1]


    <Grid x:Name="LayoutRoot" Background="White">

            <StackPanel Orientation="Vertical">

                <Grid HorizontalAlignment="Left" Margin="20,10,20,10">

                    <Rectangle Fill="Red" RadiusX="5" RadiusY="5"/>

                    <StackPanel x:Name="SliderContainer" Orientation="Horizontal"

                                HorizontalAlignment="Stretch" Margin="10">

                        <TextBlock Text="" Foreground="White"/>

                        <Slider x:Name="slider" Minimum="0" Maximum="360"

                                Value="{Binding RotationX, Mode=TwoWay,

                                ElementName=imageRotation}" Width="300"/>

                        <TextBlock x:Name="sliderValue" Text="{Binding Value,

                                   ElementName=slider}"

                                   Foreground="White"/>

                    </StackPanel>

                </Grid>

            </StackPanel>

       

            <Image x:Name="image" Source="Image/Zzang.jpg" Width="200" Height="300">

                <Image.Projection>

                    <PlaneProjection x:Name="imageRotation" RotationY="45"/>

                </Image.Projection>

            </Image>

    </Grid>


    결과화면

    [그림 41-2]


    응용 입니다.

    [그림 41-3]


    사진속 주인공 : 배우 조선옥

    반응형

    Comments