silverlight - How to make modifable worm (shape)? -


i making silverlight program user can add worms ground. worms has modifable. can have 3 or more controlpoints user can move , edit worm. worm has have maximum , minimum length. has somekind outfit looks worm. have made pretty worm canonical spline problem max , minimum lengths , outfit. not waiting ready codes new ideas how can done.

example made mspaint :) http://tinypic.com/r/bgxp3m/7

you can use pen tool in expression blend create open path bezier curves. direct selection tool can modify points give desired shape. if in storyboard, expression blend expand path data uncompressed format, can animated, named, , referenced code behind. here sample worm:

<grid x:name="layoutroot" background="white">     <grid.resources>         <storyboard x:name="wriggle">             <pointanimation duration="0:0:0.7" to="59.4217224121094,11.1413049697876" storyboard.targetproperty="(path.data).(pathgeometry.figures)[0].(pathfigure.segments)[1].(beziersegment.point1)" storyboard.targetname="wormbody" d:isoptimized="true"/>             <pointanimation duration="0:0:0.7" to="21.5,45.9078826904297" storyboard.targetproperty="(path.data).(pathgeometry.figures)[0].(pathfigure.segments)[0].(beziersegment.point2)" storyboard.targetname="wormbody" d:isoptimized="true"/>             <pointanimation duration="0:0:0.7" to="9.25,28.6580047607422" storyboard.targetproperty="(path.data).(pathgeometry.figures)[0].(pathfigure.segments)[0].(beziersegment.point1)" storyboard.targetname="wormbody" d:isoptimized="true"/>         </storyboard>     </grid.resources>     <path x:name="wormbody" horizontalalignment="left" height="67.316" margin="167,150.092,0,0" stroke="black" strokethickness="10" uselayoutrounding="false" verticalalignment="top" width="91">         <path.data>             <pathgeometry fillrule="evenodd">                 <pathfigure isfilled="true" isclosed="false" startpoint="5,62.3157653808594">                     <beziersegment point3="42.2093734741211,24.9581699371338" point2="4.49375009536743,30.3548755645752" point1="35.375,53.3601760864258"/>                     <beziersegment point3="86,5" point2="73.8499984741211,24.9581699371338" point1="54.1062507629395,22.6553039550781"/>                 </pathfigure>             </pathgeometry>         </path.data>     </path>     <ellipse horizontalalignment="left" height="15" margin="246,146,0,0" stroke="black" strokethickness="10" verticalalignment="top" width="15"/> </grid> 

Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -