Пример #1
0
        void DrawLion()
        {
            //set gamma settings
            drawer.GammaCorrected = chkUseGamma.Checked;
            drawer.SetGamma(gammaFactorRed, gammaFactorGreen, gammaFactorBlue);

            //clear background
            drawer.Clear(Colors.White);

            //get coordinates and colors
            double[][] polygons = LionPathHelper.GetLionPolygons();
            Color[]    colors   = LionPathHelper.GetLionColors();

            //iterate all polygons and draw them
            double[] coordinates = null;
            for (int i = 0; i < polygons.Length; i++)
            {
                coordinates = polygons[i];
                Fill fill = new Fill(colors[i]);
                drawer.DrawPolygon(fill, coordinates);
            }

            //show to screen
            DisplayBuffer(buffer);
        }
Пример #2
0
        void DrawLion()
        {
            //get coordinates and colors
            double[][] polygons = LionPathHelper.GetLionPolygons();
            Color[]    colors   = LionPathHelper.GetLionColors();

            drawer.GammaCorrected = false;//DEBUG - ColorRasterizer is not yet finished

            //iterate all polygons and draw them
            double[] coordinates = null;
            for (int i = 0; i < polygons.Length; i++)
            {
                coordinates = polygons[i];
                Fill fill = new Fill(colors[i]);
                fill.FillingRule = FillingRule.EvenOdd;//DEBUG - ColorRasterizer is not yet finished

                drawer.DrawPolygon(fill, coordinates);
            }
        }
Пример #3
0
        void DrawLion(PixelsBuffer buffer, int x, int y)
        {
            //create a new drawing context
            //PixelBuffer buffer = new PixelBuffer(400, 400);
            IDrawer drawer = new Drawer(buffer);

            //get coordinates and colors
            double[][]            polygons = LionPathHelper.GetLionPolygons();
            Cross.Drawing.Color[] colors   = LionPathHelper.GetLionColors();

            //iterate all polygons and draw them
            double[] coordinates = null;
            drawer.Translate(x, y);
            for (int i = 0; i < polygons.Length; i++)
            {
                coordinates = polygons[i];
                Fill fill = new Fill(colors[i]);
                drawer.DrawPolygon(fill, coordinates);
            }
        }
        void DrawLion()
        {
            //create a new drawing context
            PixelsBuffer buffer = new PixelsBuffer(400, 400);
            IDrawer      drawer = new Drawer(buffer);

            drawer.Clear(Colors.White);

            //get coordinates and colors
            double[][] polygons = LionPathHelper.GetLionPolygons();
            Color[]    colors   = LionPathHelper.GetLionColors();

            //iterate all polygons and draw them
            double[] coordinates = null;
            for (int i = 0; i < polygons.Length; i++)
            {
                coordinates = polygons[i];
                Fill fill = new Fill(colors[i]);
                drawer.DrawPolygon(fill, coordinates);
            }

            //show to screen
            DisplayBuffer(buffer);
        }