블로그 이미지
래곤
study 관련자료를 한곳으로 자기 개발 목적으로 재태크 재무 관리 목적으로 일상생활의 팁을 공유 하기 위하여 블로그를 개설 하였습니다.

calendar

1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
반응형

Category

Recent Post

Recent Comment

Archive

2009. 11. 26. 18:39 .Net Project/SilverLight 3.0
반응형
 - PathGeometry 화면 표시

 <UserControl x:Class="RiaGeometry.FrmPathGeometry"

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

    mc:Ignorable="d"

    d:DesignHeight="300" d:DesignWidth="400">

   

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

        <Path Fill="Red" Stroke="Black" StrokeThickness="5">

            <Path.Data>

                <PathGeometry>

                    <!-- First -->

                    <PathFigure StartPoint="20, 20" IsClosed="True">

                        <LineSegment Point="20, 100"></LineSegment>

                        <LineSegment Point="100, 100"></LineSegment>

                    </PathFigure>

                    <!-- Second -->

                    <PathFigure StartPoint="90,20" IsClosed="True">

                        <LineSegment Point="20, 100"></LineSegment>

                        <LineSegment Point="100, 100"></LineSegment>

                    </PathFigure>

                </PathGeometry>

            </Path.Data>

        </Path>

    </Grid>

 

</UserControl> 




반응형
posted by 래곤
2009. 11. 26. 18:37 .Net Project/SilverLight 3.0
반응형
 - PathFigure
  LineSegment, BezierSegment와 같은 세그먼트의 집합으로 구성

 

<UserControl x:Class="RiaGeometry.FrmPathData"

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

    mc:Ignorable="d"

    d:DesignHeight="300" d:DesignWidth="400">

   

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

        <Path Stroke="Black" StrokeThickness="5" Fill="Red">

            <Path.Data>

                <PathGeometry>

                    <PathFigure StartPoint="20, 20" IsClosed="True">

                        <LineSegment Point="20, 90"></LineSegment>

                        <LineSegment Point="90, 90"></LineSegment>

                    </PathFigure>

                </PathGeometry>

            </Path.Data>

        </Path>

        <!-- 위 코드를 아래 코드로  줄여서 표현 : 경로 태그 구문 미니 언어 -->

        <Path Stroke="Black" StrokeThickness="5" Fill="Red"

            Data="M 120,120 L 120,200 L 200,200 Z">

        </Path>

    </Grid>

</UserControl> 




반응형
posted by 래곤
2009. 11. 26. 18:33 .Net Project/SilverLight 3.0
반응형
 - GeometryGroup
    다수의 Geometry 객체를 포함 가능하며, 포함하는 Geometry 객체는 해당 영역을 결합하지 않고,
    통합 가능 하다
    반면, GeometryGroup 은 LineGeometry, RectangleGeometry와 같은 Geometry의 집합으로 구성
    자신이 포함하고 있는 Geometry에 각각 다른 프로퍼티를 설정 가능
 

<UserControl x:Class="RiaGeometry.FrmGeometryGroup"

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

    mc:Ignorable="d"

    d:DesignHeight="300" d:DesignWidth="400">

   

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

        <Path Stroke="Black" StrokeThickness="10" Fill="Red">

            <Path.Data>

                <GeometryGroup>

                    <PathGeometry>

                        <PathFigure StartPoint="20, 20" IsClosed="True">

                            <LineSegment Point="20, 100"></LineSegment>

                            <LineSegment Point="100, 100"></LineSegment>

                        </PathFigure>

                    </PathGeometry>

                    <PathGeometry>

                        <PathGeometry.Transform>

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

                        </PathGeometry.Transform>

                        <PathFigure StartPoint="20, 20" IsClosed="True">

                            <LineSegment Point="20, 100"></LineSegment>

                            <LineSegment Point="100, 100"></LineSegment>

                        </PathFigure>

                    </PathGeometry>

                </GeometryGroup>

            </Path.Data>

        </Path>

    </Grid>

</UserControl> 



반응형
posted by 래곤
2009. 11. 26. 15:34 .Net Project/SilverLight 3.0
반응형
- BezierSegment 
   두 점 사이에 입방형 3차원 곡선을 만듭니다

 <UserControl x:Class="RiaGeometry.FrmBezierSegment"

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

    mc:Ignorable="d"

    d:DesignHeight="300" d:DesignWidth="400">

   

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

        <Path Stroke="Black" StrokeThickness="10">

            <Path.Data>

                <PathGeometry>

                    <PathFigure StartPoint="0, 0">

                        <BezierSegment

                            Point1="150, 0"

                            Point2="50, 150"

                            Point3="200, 200">

                        </BezierSegment>

                    </PathFigure>

                </PathGeometry>

            </Path.Data>

        </Path>

    </Grid>

</UserControl> 



반응형
posted by 래곤