Exemplo n.º 1
0
        //
        //Methodes
        //
        public static void Zaaien(Point locatie, Graphics papier, int lengte, int breedte, int zaaiAfstand)
        {
            int   puntX = locatie.X - lengte / 2;
            int   puntY = locatie.Y - breedte / 2;
            Point oorspronkelijkeLocatie = locatie;
            int   startpuntY             = puntY;

            lengte  = puntX + lengte;
            breedte = puntY + breedte;
            while (puntX < lengte)
            {
                while (puntY < breedte)
                {
                    locatie = new Point(puntX, puntY);
                    Gras gras = new Gras(locatie);
                    gras.Teken(papier);
                    puntY = puntY + zaaiAfstand;
                }
                puntY = startpuntY;
                puntX = puntX + zaaiAfstand;
            }
        }