示例#1
0
        //<Snippet37>
        private void HitTestWithEraser(Point[] points)
        {
            RectangleStylusShape eraser = new RectangleStylusShape(3, 3, 0);

            StrokeCollection strokes = presenter.Strokes.HitTest(points, eraser);

            foreach (Stroke s in strokes)
            {
                s.DrawingAttributes.Color = Colors.Purple;
            }
        }
示例#2
0
        private StylusShape generateStylusShape()
        {
            double      size = drawingAttributes.Width;
            StylusShape stylusShape;

            if (drawingAttributes.StylusTip == StylusTip.Ellipse)
            {
                stylusShape = new EllipseStylusShape(size, size);
            }
            else
            {
                stylusShape = new RectangleStylusShape(size, size);
            }

            return(stylusShape);
        }