Intersection point in silverlight/wpf

Posted by Andrei Neagu on Stack Overflow See other posts from Stack Overflow or by Andrei Neagu
Published on 2010-04-07T19:39:14Z Indexed on 2010/04/07 19:43 UTC
Read the original article Hit count: 475

Filed under:
|
|

Hello,

Given a path like this one :

<Path Stretch="Fill" Stroke="#FFD69436" Data="M 0,20 L 22.3,20 L 34,0 L 44.7,20 L 68,20 L 55.8,40 L 68,60 L 44.7,60 L 34,80 L 22.3,60 L 0,60 L 11.16,40 L 0,20 Z">
            <Path.Fill>
                <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                    <LinearGradientBrush.GradientStops>
                        <GradientStop Color="#FFFFFF" Offset="0" />
                        <GradientStop Color="Orange" Offset="1" />
                    </LinearGradientBrush.GradientStops>
                </LinearGradientBrush>
            </Path.Fill>
        </Path>

How can I get the point that is at the edge of this figure at any angle? Lets say that I want the intersection point between the edge of this figure and a line passing through the center of this figure, at the 30 degrees angle with the OX axe?

thanks.

© Stack Overflow or respective owner

Related posts about Silverlight

Related posts about wpf