List <Step> AddStepsForOneLine(Polygon reducedPolygon, Point previous, Point current) { // use current stroke specification for fill of widened polygon Polygon widened = new LineWidener(previous, current, reducedPolygon.Stroke, string.Empty).Widen(this.colorTranslation.MaxStepLength); double lineAngle = previous.Angle(current); var ctRotated = new ColorTranslation { Color = widened.Color, StepAngle = this.colorTranslation.StepAngle + lineAngle, MaxStepLength = this.colorTranslation.MaxStepLength, LineHeight = this.colorTranslation.LineHeight, MoveInside = 0 }; var angleStepper = new AngleStepper(widened, ctRotated); return(angleStepper.CalculateFillSteps()); }
public static bool IsStroke(this ColorTranslation @this) => @this.Color.StartsWith("stroke:");
public static bool IsFill(this ColorTranslation @this) => @this.Color.StartsWith("fill:");
public FillCalculator(Polygon polygon, ColorTranslation ct) { this.polygon = polygon; this.colorTranslation = ct; }
public AngleStepper(Polygon p, ColorTranslation ct) { this.p = p; this.ct = ct; }
public HorizontalStepper(Polygon p, ColorTranslation ct) { this.polygon = p; this.ct = ct; }