/// <summary> /// Helper wrapper /// </summary> internal static StrokeNodeIterator GetIterator(Stroke stroke, DrawingAttributes drawingAttributes) { if (stroke == null) { throw new System.ArgumentNullException("stroke"); } if (drawingAttributes == null) { throw new System.ArgumentNullException("drawingAttributes"); } StylusPointCollection stylusPoints = drawingAttributes.FitToCurve ? stroke.GetBezierStylusPoints() : stroke.StylusPoints; return GetIterator(stylusPoints, drawingAttributes); }
public EncogOCR_StrokeDefinition(Stroke stroke) { this.Points = (stroke.DrawingAttributes.FitToCurve ? stroke.GetBezierStylusPoints() : stroke.StylusPoints). Select(o => new Point(o.X, o.Y)). ToArray(); this.Color = stroke.DrawingAttributes.Color.ToHex(); this.Thickness = Math1D.Avg(stroke.DrawingAttributes.Width, stroke.DrawingAttributes.Height); }