Adding shapes to InkCanvas

G

Guest

Could someone please tell me how to add a circle (ellipse) to an InkCanvas
but as a stroke - a collection of StylusPoints.

The requirements is to allow the user to create a sketch on the canvas and
allow circles and rectangles to be dragged onto the canvas. I then playback
the formation of the canvas with animation. I can do all but the adding of
shapes.

I can obviously add an Ellipse as child with canvas.Children.Add(myEllipse)
but I want to add the shape to the Strokes collection.

I can draw a circle freehand and look at the points but not very tidy (even
with beizer smoothing on.)

In code I can build up and add a collection of points (seems the most likely
approach?)

Maybe Could someone tell me how I could create an Ellipse and get the list
of points?

Or as my highschool geometry fails me how to create a list of Stylus points
(x,y) to draw a circle in C#.

Many thanks,
b
 
C

Chris Dunaway

Could someone please tell me how to add a circle (ellipse) to an InkCanvas
but as a stroke - a collection of StylusPoints.

The requirements is to allow the user to create a sketch on the canvas and
allow circles and rectangles to be dragged onto the canvas. I then playback
the formation of the canvas with animation. I can do all but the adding of
shapes.

I can obviously add an Ellipse as child with canvas.Children.Add(myEllipse)
but I want to add the shape to the Strokes collection.

I can draw a circle freehand and look at the points but not very tidy (even
with beizer smoothing on.)

In code I can build up and add a collection of points (seems the most likely
approach?)

Maybe Could someone tell me how I could create an Ellipse and get the list
of points?

Or as my highschool geometry fails me how to create a list of Stylus points
(x,y) to draw a circle in C#.

Many thanks,
b

You may get a better answer here:

http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=119&SiteID=1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top