Exemplo n.º 1
0
        public static void StartDemo()
        {
#if SourceDepth24
            line_patterns_application app = new line_patterns_application(pix_format_e.pix_format_rgb24, AGG.UI.PlatformSupportAbstract.ERenderOrigin.OriginBottomLeft);
#else
            line_patterns_application app = new line_patterns_application(PixelFormats.pix_format_rgba32, AGG.UI.PlatformSupportAbstract.ERenderOrigin.OriginBottomLeft);
#endif
            app.Caption = "AGG Example. Drawing Lines with Image Patterns";

            if (!app.load_img(0, "1") ||
                !app.load_img(1, "2") ||
                !app.load_img(2, "3") ||
                !app.load_img(3, "4") ||
                !app.load_img(4, "5") ||
                !app.load_img(5, "6") ||
                !app.load_img(6, "7") ||
                !app.load_img(7, "8") ||
                !app.load_img(8, "9"))
            {
                String buf = "There must be files 1%s...9%s\n"
                             + "Download and unzip:\n"
                             + "http://www.antigrain.com/line_patterns.bmp.zip\n"
                             + "or\n"
                             + "http://www.antigrain.com/line_patterns.ppm.tar.gz\n";
                throw new System.Exception(buf);
            }

            if (app.init(500, 450, (uint)WindowFlags.Risizeable))
            {
                app.run();
            }
        }
Exemplo n.º 2
0
		public static void StartDemo()
		{
#if SourceDepth24
            line_patterns_application app = new line_patterns_application(pix_format_e.pix_format_rgb24, AGG.UI.PlatformSupportAbstract.ERenderOrigin.OriginBottomLeft);
#else
            line_patterns_application app = new line_patterns_application(PixelFormats.pix_format_rgba32, AGG.UI.PlatformSupportAbstract.ERenderOrigin.OriginBottomLeft);
#endif
            app.Caption = "AGG Example. Drawing Lines with Image Patterns";

            if(!app.load_img(0, "1") ||
               !app.load_img(1, "2") ||
               !app.load_img(2, "3") ||
               !app.load_img(3, "4") ||
               !app.load_img(4, "5") ||
               !app.load_img(5, "6") ||
               !app.load_img(6, "7") ||
               !app.load_img(7, "8") ||
               !app.load_img(8, "9"))
            {
                String buf = "There must be files 1%s...9%s\n"
                             + "Download and unzip:\n"
                             + "http://www.antigrain.com/line_patterns.bmp.zip\n"
                             + "or\n"
                             + "http://www.antigrain.com/line_patterns.ppm.tar.gz\n";
                throw new System.Exception(buf);
            }

            if(app.init(500, 450, (uint)WindowFlags.Risizeable))
            {
                app.run();
            }
        }