public void GenerateDash(VertexStore srcVxs, ILineSegmentWalkerOutput output)
 {
     if (_dashGenLineWalker == null)
     {
         return;
     }
     _dashGenLineWalker.Walk(srcVxs, output);
 }
Beispiel #2
0
            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;
            }
Beispiel #3
0
        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;
            }
        }
Beispiel #4
0
        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;
                }
            }
        }
Beispiel #5
0
 internal void InvokeLineTo(ILineSegmentWalkerOutput output, double x, double y)
 {
     _lineSegDel.Invoke(output, this, VertexCmd.LineTo, x, y);
 }
Beispiel #6
0
 static void SimpleBlankLine(ILineSegmentWalkerOutput output, LineWalkerMark walkerMark, VertexCmd cmd, double x, double y)
 {
 }