public override void DrawArc(double x1, double y1, double x2, double y2, double bulge) { if (thinlinemode != ThinLineModeFlag.OwnThinLines) { base.DrawArc(x1, y1, x2, y2, bulge); return; } stipplebit = 0x8000; int clipres = Clipper.ClipArc(x1, y1, x2, y2, bulge, clipbuffer, clipMinX, clipMinY, clipMaxX, clipMaxY); for (int idx = 0; idx < clipres; idx += 5) { int cx = GFXUtil.FloatToInt(clipbuffer[idx]), cy = GFXUtil.FloatToInt(clipbuffer[idx + 1]), nx, ny; GeomUtil.FlattenArc(clipbuffer[idx], clipbuffer[idx + 1], clipbuffer[idx + 2], clipbuffer[idx + 3], clipbuffer[idx + 4], false, flattentol, (x, y, moveto) => { nx = GFXUtil.FloatToInt(x); ny = GFXUtil.FloatToInt(y); Line_Internal(cx, cy, nx, ny, x2 == x && y2 == y); //set last point if last segment cx = nx; cy = ny; }); } }
public override void DrawArc(double x1, double y1, double x2, double y2, double bulge) { int prevx = GFXUtil.FloatToInt(x1); int prevy = GFXUtil.FloatToInt(y1); int clipres = Clipper.ClipArc(x1, y1, x2, y2, bulge, clipbuffer, Clip.XMin, Clip.YMin, Clip.XMax, Clip.YMax); for (int idx = 0; idx < clipres; idx += 5) { int cx = GFXUtil.FloatToInt(clipbuffer[idx]), cy = GFXUtil.FloatToInt(clipbuffer[idx + 1]), nx, ny; GeomUtil.FlattenArc(clipbuffer[idx], clipbuffer[idx + 1], clipbuffer[idx + 2], clipbuffer[idx + 3], clipbuffer[idx + 4], false, flattentol, (x, y, moveto) => { nx = GFXUtil.FloatToInt(x); ny = GFXUtil.FloatToInt(y); target.Add(cx, cy, nx, ny, currentobject); cx = nx; cy = ny; }); } }