Beispiel #1
0
        public static LineWalkerMark AddMark(this LineWalker walker, double len, LineSegmentDelegate segDel)
        {
            var walkerMark = new LineWalkerMark(len, segDel);

            walker.AddMark(walkerMark);
            return(walkerMark);
        }
Beispiel #2
0
 public void Reset()
 {
     _currentMark        = null;
     _nextMarkNo         = 0;
     _total_accum_len    = 0;
     _expectedSegmentLen = 0;
     _state               = WalkState.Init;
     _nextMarkNo          = 0;
     _latest_X            = _latest_Y =
         _latest_moveto_Y = _latest_moveto_Y = 0;
 }
Beispiel #3
0
 //-----------------------------------------------------
 void StepToNextMarkerSegment()
 {
     _currentMark        = _marks[_nextMarkNo];
     _expectedSegmentLen = _currentMark.Len;
     if (_nextMarkNo + 1 < _marks.Count)
     {
         _nextMarkNo++;
     }
     else
     {
         _nextMarkNo = 0;
     }
 }
Beispiel #4
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 #5
0
        public static LineWalkerMark AddMark(this LineWalker walker, double len, LineWalkDashStyle daskStyle)
        {
            LineWalkerMark mark = null;

            switch (daskStyle)
            {
            default: throw new NotSupportedException();

            case LineWalkDashStyle.Solid:
                mark = new LineWalkerMark(len, SimpleSolidLine);
                break;

            case LineWalkDashStyle.Blank:
                mark = new LineWalkerMark(len, SimpleBlankLine);
                break;
            }
            walker.AddMark(mark);
            return(mark);
        }
Beispiel #6
0
        public static void AddMark(this LineWalker walker, double len, LineSegmentDelegate segDel)
        {
            var mark = new LineWalkerMark(len, segDel);

            walker.AddWalkMark(mark);
        }
Beispiel #7
0
 public void AddSegmentMark(LineWalkerMark segMark)
 {
     _marks.Add(segMark);
 }
Beispiel #8
0
 public void AddWalkMark(LineWalkerMark walkerMark)
 {
     _walkStateMan.AddSegmentMark(walkerMark);
 }
Beispiel #9
0
 public void AddSegmentMark(LineWalkerMark segMark)
 {
     segMark.Index = _marks.Count;
     _marks.Add(segMark);
 }
Beispiel #10
0
 static void SimpleBlankLine(ILineSegmentWalkerOutput output, LineWalkerMark walkerMark, VertexCmd cmd, double x, double y)
 {
 }
 public void AddMoveTo(LineWalkerMark maker, double x, double y) => _vxs.AddMoveTo(x, y);
Beispiel #12
0
 public void AddWalkMark(LineWalkerMark walkerMark)
 {
     _lineMarker.AddSegmentMark(walkerMark);
 }