Sign In|Join
Home/Silverlight.NET Forums/General Silverlight/Installation and Setup/Convert Path data to image clip
Last post Sep 03, 2008 07:32 AM by SilverlightShow
Member
107 Points
61 Posts
Sep 03, 2008 05:38 AM | LINK
Hai,
How do covert the path Data to image clip
Example
<Path Data="F1 M121.55373,184.49366 C120.98342,181.64259 122.27148,185.69678 122.84131,183.41602 123.41113,181.13525 125.40723,178.56934 125.40723,178.56934 125.40723,178.56934 125.53809,178.88574 125.76025,179.4624 129.30371,172.99805 137.76709,165.50684 141.45703,158.12744 145.45703,150.12744 147.62744,137.01123 148.62744,128.01123 149.62744,119.01123 146.47607,90.007324 138.94727,76.383301 135.61328,70.349609 130.16797,64.898926 122.43457,62.545898 121.46582,63.242676 120.63525,63.856445
120,64.333008 116,67.333008 103,87.333008 99,93.333008 95,99.333008 77,131.33301 73,138.33301 69,145.33301 56,165.33301 53,172.33301 50.53418,178.08691 122.12404,187.34473 121.55373,184.49366 z" Width="99.695" Stretch="Fill" Height="129.916" Visibility="Visible" x:Name="Path1" Stroke="#FF61666C" StrokeThickness="0.5" RenderTransformOrigin="0.5,0.5" Canvas.Left="-3.506" Canvas.Top="-4.342">
if you have any link regarging this, please forward me.
By neethan
Participant
1145 Points
194 Posts
Sep 03, 2008 06:03 AM | LINK
Hi,
check this article http://electricbeach.org/?p=135
Sep 03, 2008 06:57 AM | LINK
Sep 03, 2008 07:32 AM | LINK
try this one(it does not use your path, but you'll get the idea):
<Image Source="chaduri.jpg" Stretch="Uniform"> <Image.Clip> <PathGeometry> <PathGeometry.Figures> <PathFigure StartPoint="10,50"> <PathFigure.Segments> <BezierSegment Point1="100,0" Point2="200,200" Point3="300,100"/> <LineSegment Point="400,100" /> <ArcSegment Size="50,50" RotationAngle="45" IsLargeArc="True" SweepDirection="Clockwise" Point="200,100"/> </PathFigure.Segments> </PathFigure> </PathGeometry.Figures> </PathGeometry> </Image.Clip> </Image>
Check also the following links:
http://msdn.microsoft.com/en-us/library/cc189068(VS.95).aspx
http://msdn.microsoft.com/en-us/library/system.windows.media.pathgeometry(VS.95).aspx
http://msdn.microsoft.com/en-us/library/system.windows.uielement.clip(VS.95).aspx
nava_tup
Member
107 Points
61 Posts
Convert Path data to image clip
Sep 03, 2008 05:38 AM | LINK
Hai,
How do covert the path Data to image clip
Example
<Path Data="F1 M121.55373,184.49366 C120.98342,181.64259 122.27148,185.69678 122.84131,183.41602 123.41113,181.13525 125.40723,178.56934 125.40723,178.56934 125.40723,178.56934 125.53809,178.88574 125.76025,179.4624 129.30371,172.99805 137.76709,165.50684 141.45703,158.12744 145.45703,150.12744 147.62744,137.01123 148.62744,128.01123 149.62744,119.01123 146.47607,90.007324 138.94727,76.383301 135.61328,70.349609 130.16797,64.898926 122.43457,62.545898 121.46582,63.242676 120.63525,63.856445
120,64.333008 116,67.333008 103,87.333008 99,93.333008 95,99.333008 77,131.33301 73,138.33301 69,145.33301 56,165.33301 53,172.33301 50.53418,178.08691 122.12404,187.34473 121.55373,184.49366 z" Width="99.695" Stretch="Fill" Height="129.916" Visibility="Visible" x:Name="Path1" Stroke="#FF61666C" StrokeThickness="0.5" RenderTransformOrigin="0.5,0.5" Canvas.Left="-3.506" Canvas.Top="-4.342">
if you have any link regarging this, please forward me.
By neethan
SilverlightShow
Participant
1145 Points
194 Posts
Re: Convert Path data to image clip
Sep 03, 2008 06:03 AM | LINK
Hi,
check this article http://electricbeach.org/?p=135
SilverlightShow Team,
www.SilverlightShow.net - Silverlight and WP7 tutorials, articles, news
nava_tup
Member
107 Points
61 Posts
Re: Re: Convert Path data to image clip
Sep 03, 2008 06:57 AM | LINK
SilverlightShow
Participant
1145 Points
194 Posts
Re: Re: Convert Path data to image clip
Sep 03, 2008 07:32 AM | LINK
Hi,
try this one(it does not use your path, but you'll get the idea):
Check also the following links:
http://msdn.microsoft.com/en-us/library/cc189068(VS.95).aspx
http://msdn.microsoft.com/en-us/library/system.windows.media.pathgeometry(VS.95).aspx
http://msdn.microsoft.com/en-us/library/system.windows.uielement.clip(VS.95).aspx
SilverlightShow Team,
www.SilverlightShow.net - Silverlight and WP7 tutorials, articles, news