示例#1
0
 private IWavyBorder<double> GetVerticalWavyBorder()
 {
     Func<Position, double> transformer = pos => Height - pos.X;
     var parameters = new WavyBorderParameters(Height - IndentDepth, 1, WaveCount);
     var builder = new UprightWavyBorderBuilder(parameters, new HalfStepExtraStartStrategy());
     return builder.WavyBorder.Transform(transformer);
 }
示例#2
0
 public virtual IWavyBorder<IEnumerable<Point>> GetWavySurface()
 {
     var borderBuilder = new UprightWavyBorderBuilder(
         new WavyBorderParameters(DenseWidth, 1, WaveCount),
         new FixedExtraStrategy());
     var borderUp = borderBuilder.WavyBorder.Transform(pos => new Point(pos.X, 0));
     var borderDown = borderBuilder.WavyBorder.Transform(pos => new Point(pos.X, Sheet.Height));
     return borderUp.Connect(borderDown, new LineConnectStrategy());
 }