By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,974 Members | 1,834 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,974 IT Pros & Developers. It's quick & easy.

Adding shapes to InkCanvas

P: n/a
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
Sep 19 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Sep 19, 2:28 am, missBlueBar
<missBlue...@discussions.microsoft.comwrote:
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/Sho...D=119&SiteID=1
Sep 19 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.