Example #1
0
        //---
        //DEFAULT OBJECTS
        //---

        //Default Rectangled Simple Surface (no shifts)
        public static Technique DefaultRectangledSimple(SizeF tileSize, HatchingMode hatching)
        {
            Technique t;

            t = new Technique(tileSize, new Point(1, 1), new Point(1, 1));
            t.SetTileHatching(0, 0, hatching);
            t.SetPointShift(0, 0, new PointF(0, 0));

            return(t);
        }
Example #2
0
        //Default Triangled Surface (shifts used to make the surface triangle-oriented)
        public static Technique DefaultTriangledSimple(SizeF tileSize, bool shiftOnRow0)
        {
            Technique t;

            t = new Technique(tileSize, new Point(1, 2), new Point(1, 2));
            if (shiftOnRow0 == false)
            {
                t.SetTileHatching(0, 0, HatchingMode.NWSE);
                t.SetTileHatching(0, 1, HatchingMode.NESW);
                t.SetPointShift(0, 0, new PointF(0, 0));
                t.SetPointShift(0, 1, new PointF(+tileSize.Width / 2, 0));
            }
            else
            {
                t.SetTileHatching(0, 0, HatchingMode.NESW);
                t.SetTileHatching(0, 1, HatchingMode.NWSE);
                t.SetPointShift(0, 0, new PointF(+tileSize.Width / 2, 0));
                t.SetPointShift(0, 1, new PointF(0, 0));
            }

            return(t);
        }
Example #3
0
        //Default Rectangled Alternated Surface (no shifts) / hatching00 represents the hatching of tile (0,0). the rest are alternated to this
        public static Technique DefaultRectangledAlternated(SizeF tileSize, HatchingMode hatchingOnTile00)
        {
            Technique t;

            t = new Technique(tileSize, new Point(2, 2), new Point(1, 1));
            t.SetTileHatching(0, 0, hatchingOnTile00);
            t.SetTileHatching(0, 1, (HatchingMode)(1 - (int)hatchingOnTile00));         //1-x does bool negation
            t.SetTileHatching(1, 0, (HatchingMode)(1 - (int)hatchingOnTile00));         // --''--
            t.SetTileHatching(1, 1, hatchingOnTile00);

            t.SetPointShift(0, 0, new PointF(0, 0));

            return(t);
        }