Blog Content

    티스토리 뷰

    40.SilverLight3 - Transform : TransformGroup

    반응형
    TransformGroup
    - Transforms 를 그룹화 하여 여러개를 동시에 적용할 때 사용 ( 실제 3D 효과는 아님 )


    MainPage.xaml

    [그림 40-1]


    <Canvas Width="400" Height="300" Background="Red">

            <Rectangle Width="100" Height="100" Fill="Yellow" Opacity="0.4">

                <Rectangle.RenderTransform>

                    <TransformGroup>

                        <RotateTransform Angle="45" CenterX="50" CenterY="50">

                        </RotateTransform>

                        <ScaleTransform ScaleX="1.5" ScaleY="1.5"></ScaleTransform>

                        <TranslateTransform X="100" Y="50"></TranslateTransform>

                    </TransformGroup>

                </Rectangle.RenderTransform>

            </Rectangle>


            <TextBlock Text=" " FontSize="15">

                <TextBlock.RenderTransform>

                    <TransformGroup>

                        <TranslateTransform X="0" Y="75"></TranslateTransform>

                        <ScaleTransform ScaleX="1.2" ScaleY="2"></ScaleTransform>

                        <SkewTransform AngleX="20" AngleY="10"></SkewTransform>

                        <RotateTransform Angle="-20"></RotateTransform>

                    </TransformGroup>

                </TextBlock.RenderTransform>

            </TextBlock>

    </Canvas>



    반응형

    Comments