2D Path graphics question


  • Hi, I've been taking a look at the InkPad sample that was shipped with the developer preview.  I'm trying to tinker with the InkManager in C++.  The sample is written in javascript and makes use of the CanvasRenderingContext2D object.  What is a good counterpart to this object in C++?  I've been trying to use the Path object but I'm having trouble understanding how all the objects it depends on interact with one another.  For example, PathGeometry::Figures expects a managed Figure object, instead of a Figure object created on the stack.  Should I be generating temporary objects using gcnew for this?  Or am I supposed to be asking some other object for an instanciation of Figure?

    It seemes that all the other shapes are very easy to interact with programmatically except for Path.  Am I barking up the wrong tree by using Path in the first place? The reason I gravitated towards it is it can (apparently) take a mixture of LinearSegments and BezierSegments, similar to how the InkPad sample uses the canvas context in JS.  I'm aware I could use Polyline fairly easily, but that would defeat the purpose of the bezier segments coming out of the InkManager.

    Wednesday, February 15, 2012 8:22 PM