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

            walker.AddMark(walkerMark);
            return(walkerMark);
        }
Esempio n. 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;
 }
Esempio n. 3
0
 //-----------------------------------------------------
 void StepToNextMarkerSegment()
 {
     _currentMark        = _marks[_nextMarkNo];
     _expectedSegmentLen = _currentMark.Len;
     if (_nextMarkNo + 1 < _marks.Count)
     {
         _nextMarkNo++;
     }
     else
     {
         _nextMarkNo = 0;
     }
 }
Esempio n. 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;
            }
        }
Esempio n. 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);
        }
Esempio n. 6
0
        public static void AddMark(this LineWalker walker, double len, LineSegmentDelegate segDel)
        {
            var mark = new LineWalkerMark(len, segDel);

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