GoStroke Split in Two

I need a bit of guidance in the following:

the user draw a Freehand stroke and want to cut of a piece of the stroke.
if you look at the image the cut must be on the red X the part in yellow can be selected and deleted afterwards.

You have GoStroke.GetSegmentNearPoint to get the index of the point in the list of points near the red X.

Then you have GoStroke properties/members PointsCount, GetPoint, SetPoint, SetPoints, RemovePoint, AddPoint and Copy to edit/duplicate the points in the stroke.