첨부 실행 코드는 나눔고딕코딩 폰트를 사용합니다.
유용한 소스 코드가 있으면 icodebroker@naver.com으로 보내주시면 감사합니다.
블로그 자료는 자유롭게 사용하세요.

■ PolyBezierSegment 엘리먼트 : 무지개 색 무한대 기호 만들기

----------------------------------------------------------------------------------------------------


TestProject.zip


MainWindow.xaml

 

 

<Window x:Class="TestProject.MainWindow"

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

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

    Width="800"

    Height="600"

    Title="PolyBezierSegment 엘리먼트 : 무지개 색 무한대 기호 만들기"

    FontFamily="나눔고딕코딩"

    FontSize="16">

    <Grid>

        <Path

            HorizontalAlignment="Center"

            VerticalAlignment="Center"

            StrokeThickness="25">

            <Path.Data>

                <PathGeometry>

                    <PathGeometry.Figures>

                        <PathFigure StartPoint="100 0">

                            <PolyBezierSegment

                                Points="  45   0,   0  45,   0 100,

                                           0 155,  45 200, 100 200,

                                         155 200, 200 150, 250 100,

                                         300  50, 345   0, 400   0,

                                         455   0, 500  45, 500 100,

                                         500 155, 455 200, 400 200,

                                         345 200, 300 150, 250 100,

                                         200  50, 155   0, 100   0" />

                        </PathFigure>

                    </PathGeometry.Figures>

                </PathGeometry>

            </Path.Data>

            <Path.Stroke>

                <LinearGradientBrush>

                    <LinearGradientBrush.GradientStops>

                        <GradientStop Color="Red"    Offset="0"    />

                        <GradientStop Color="Orange" Offset="0.29" />

                        <GradientStop Color="Yellow" Offset="0.43" />

                        <GradientStop Color="Green"  Offset="0.57" />

                        <GradientStop Color="Blue"   Offset="0.71" />

                        <GradientStop Color="Indigo" Offset="0.86" />

                        <GradientStop Color="Violet" Offset="1"    />

                    </LinearGradientBrush.GradientStops>

                </LinearGradientBrush>

            </Path.Stroke>

        </Path>

    </Grid>

</Window>

 

----------------------------------------------------------------------------------------------------

Posted by 사용자 icodebroker
TAG

댓글을 달아 주세요