public void GenerateDash(VertexStore srcVxs, ILineSegmentWalkerOutput output) { if (_dashGenLineWalker == null) { return; } _dashGenLineWalker.Walk(srcVxs, output); }
public void Reset() { _currentMark = null; _nextMarkNo = 0; _expectedSegmentLen = 0; _state = WalkState.Init; _nextMarkNo = 0; _latest_X = _latest_Y = _latest_moveto_Y = _latest_moveto_Y = 0; _total_accum_len = 0; _tempPoints.Clear(); _output = null; }
static void SimpleSolidLine(ILineSegmentWalkerOutput output, LineWalkerMark walkerMark, VertexCmd cmd, double x, double y) { //solid switch (cmd) { default: throw new NotSupportedException(); case VertexCmd.MoveTo: output.AddMoveTo(walkerMark, x, y); break; case VertexCmd.LineTo: output.AddLineTo(walkerMark, x, y); break; } }
public void Walk(VertexStore src, ILineSegmentWalkerOutput output) { // //we do not flatten the curve // _walkStateMan.Reset(); _walkStateMan._output = output; int count = src.Count; VertexCmd cmd; for (int i = 0; i < count; ++i) { cmd = src.GetVertex(i, out double x, out double y); switch (cmd) { case VertexCmd.MoveTo: _walkStateMan.MoveTo(x, y); break; case VertexCmd.NoMore: i = count + 1; //force end => EXIT_LOOP break; case VertexCmd.LineTo: _walkStateMan.LineTo(x, y); break; case VertexCmd.C3: case VertexCmd.C4: throw new NotSupportedException(); case VertexCmd.Close: _walkStateMan.CloseFigure(); break; } } }
internal void InvokeLineTo(ILineSegmentWalkerOutput output, double x, double y) { _lineSegDel.Invoke(output, this, VertexCmd.LineTo, x, y); }
static void SimpleBlankLine(ILineSegmentWalkerOutput output, LineWalkerMark walkerMark, VertexCmd cmd, double x, double y) { }