locked
Stroke class RRS feed

  • Question

  • hi!

    I'm using the Tablet PC SDK and in particular the Stroke class in Microsoft.Ink.

    I'd like my class to inherit from this class to extend the info it contains while making use of all the maths stuff within.  Sounds fine, although I can't even instantiate a Stroke object because it doesn't appear to have a constructor?

    Anyone know how to go about using this class aside from receiving strokes from the Stroke event?

    Paul


    Wednesday, March 14, 2007 11:44 AM

Answers

  • I've never done it but, i think you should be able to create a Stroke manually by doing this:

    - Creating an array of Point objects (being all the points your stroke will follow)
    - using the Ink.CreateStroke() function with your Point array as a parameter like this :

    Stroke myNewStroke = myInk.CreateStroke(pointsArray);

    Some documentation : http://msdn2.microsoft.com/en-us/library/microsoft.ink.ink.createstroke.aspx

    Once again, i've never done it but, it should work...

    Thursday, March 15, 2007 6:01 PM