Exemplo n.º 1
0
        static IEnumerable <Step> CreatePatch(double patchSize, double xPosition, double yPosition, ColorTranslation ct)
        {
            var points = new Point[] { new Point(xPosition, yPosition),
                                       new Point(xPosition + patchSize, yPosition),
                                       new Point(xPosition + patchSize, yPosition + patchSize),
                                       new Point(xPosition, yPosition + patchSize) };

            Polygon p = new Polygon(points);

            var s = new AngleStepper(p, ct);

            return(s.CalculateFillSteps());
        }
Exemplo n.º 2
0
        public void Angle0IsIdenticalWithHorizontal()
        {
            var ct = new ColorTranslation();

            ct.LineHeight = 0.234;

            Polygon           p  = this.createDefaultPolygon();
            HorizontalStepper hs = new HorizontalStepper(p, ct);
            AngleStepper      a  = new AngleStepper(p, ct);


            List <Step> stepsHorizontal = hs.CalculateFillSteps();
            List <Step> stepsAngle      = a.CalculateFillSteps();

            CollectionAssert.AreEqual(stepsHorizontal, stepsAngle);
        }