public override void OnInitialize()
        {
            base.OnInitialize();

            int whichHeight   = 112;
            int whichWidth    = 300;
            int windingHeight = 140;
            int windingWidth  = 300;

            m_WhichShape = new rbox_ctrl(0.0, Height - whichHeight, whichWidth, Height);
            AddChild(m_WhichShape);
            m_WhichShape.add_item("Nested Rects All CCW");
            m_WhichShape.add_item("Nested Rects CCW, CW, CW");
            m_WhichShape.add_item("Rects And Triangle");
            m_WhichShape.add_item("Complex Path");
            m_WhichShape.cur_item(0);

            m_WhichShape.background_color(new RGBA_Doubles(0.0, 0.0, 0.0, 0.1));
            m_WhichShape.text_size(12.0);
            m_WhichShape.text_thickness(2);

            m_WindingRule = new rbox_ctrl(whichWidth + 100, Height - windingHeight, whichWidth + 100 + windingWidth, Height);
            AddChild(m_WindingRule);
            m_WindingRule.add_item("Winding ODD");
            m_WindingRule.add_item("Winding NON-ZERO");
            m_WindingRule.add_item("Winding POSITIVE");
            m_WindingRule.add_item("Winding NEGATIVE");
            m_WindingRule.add_item("Winding ABS >= 2");
            m_WindingRule.cur_item(0);

            m_WindingRule.background_color(new RGBA_Doubles(0.0, 0.0, 0.0, 0.1));
            m_WindingRule.text_size(12.0);
            m_WindingRule.text_thickness(2);

            m_EdgeFlag = new cbox_ctrl(10, Height - whichHeight - 40, "Turn on Edge Flag");
            m_EdgeFlag.status(true);
            AddChild(m_EdgeFlag);

            m_BoundryOnly = new cbox_ctrl(10, Height - whichHeight - 20, "Render Only Boundary");
            AddChild(m_BoundryOnly);

            Tesselate_Tests test = new Tesselate_Tests();

            test.MatchesGLUTesselator();
        }
        public override void OnInitialize()
        {
            base.OnInitialize();

            int whichHeight = 112;
            int whichWidth = 300;
            int windingHeight = 140;
            int windingWidth = 300;
            m_WhichShape = new rbox_ctrl(0.0, Height - whichHeight, whichWidth, Height);
            AddChild(m_WhichShape);
            m_WhichShape.add_item("Nested Rects All CCW");
            m_WhichShape.add_item("Nested Rects CCW, CW, CW");
            m_WhichShape.add_item("Rects And Triangle");
            m_WhichShape.add_item("Complex Path");
            m_WhichShape.cur_item(0);

            m_WhichShape.background_color(new RGBA_Doubles(0.0, 0.0, 0.0, 0.1));
            m_WhichShape.text_size(12.0);
            m_WhichShape.text_thickness(2);

            m_WindingRule = new rbox_ctrl(whichWidth + 100, Height - windingHeight, whichWidth + 100 + windingWidth, Height);
            AddChild(m_WindingRule);
            m_WindingRule.add_item("Winding ODD");
            m_WindingRule.add_item("Winding NON-ZERO");
            m_WindingRule.add_item("Winding POSITIVE");
            m_WindingRule.add_item("Winding NEGATIVE");
            m_WindingRule.add_item("Winding ABS >= 2");
            m_WindingRule.cur_item(0);

            m_WindingRule.background_color(new RGBA_Doubles(0.0, 0.0, 0.0, 0.1));
            m_WindingRule.text_size(12.0);
            m_WindingRule.text_thickness(2);

            m_EdgeFlag = new cbox_ctrl(10, Height - whichHeight - 40, "Turn on Edge Flag");
            m_EdgeFlag.status(true);
            AddChild(m_EdgeFlag);

            m_BoundryOnly = new cbox_ctrl(10, Height - whichHeight - 20, "Render Only Boundary");
            AddChild(m_BoundryOnly);

            Tesselate_Tests test = new Tesselate_Tests();
            test.MatchesGLUTesselator();
        }
        image_filters_application(PixelFormats format, ERenderOrigin RenderOrigin)
            : base(format, RenderOrigin)
        {
            m_step      = new SliderWidget <T>(115, 5, 400, 11);
            m_radius    = new SliderWidget <T>(115, 5 + 15, 400, 11 + 15);
            m_filters   = new rbox_ctrl <T>(0.0, 0.0, 110.0, 210.0);
            m_normalize = new cbox_ctrl <T>(8.0, 215.0, "Normalize Filter");

            m_refresh              = new ButtonWidget <T>(8.0, 273.0, "Refresh", 8, 1, 1, 3);
            m_refresh.ButtonClick += RefreshImage;
            m_run                      = new ButtonWidget <T>(8.0, 253.0, "RUN Test!", 8, 1, 1, 3);
            m_run.ButtonClick         += RunTest;
            m_single_step              = new ButtonWidget <T>(8.0, 233.0, "Single Step", 8, 1, 1, 3);
            m_single_step.ButtonClick += SingleStep;

            m_cur_angle        = (0.0);
            m_cur_filter       = (1);
            m_num_steps        = (0);
            m_num_pix          = (0.0);
            m_time1            = (0);
            m_time2            = (0);
            m_ScanlinePacked   = new ScanlinePacked8();
            m_Rasterizer       = new RasterizerScanlineAA <T>();
            m_ScanlineUnpacked = new ScanlineUnpacked8();
            m_SpanAllocator    = new SpanAllocator();

            AddChild(m_radius);
            AddChild(m_step);
            AddChild(m_filters);
            AddChild(m_run);
            AddChild(m_single_step);
            AddChild(m_normalize);
            AddChild(m_refresh);
            //m_single_step.text_size(7.5);
            m_normalize.SetFontSize(7.5);
            m_normalize.status(true);

            m_radius.label("Filter Radius={0:F2}");
            m_step.label("Step={0:F2}");
            m_radius.range(2.0, 8.0);
            m_radius.value(4.0);
            m_step.range(1.0, 10.0);
            m_step.value(5.0);

            m_filters.add_item("simple (NN)");
            m_filters.add_item("bilinear");
            m_filters.add_item("bicubic");
            m_filters.add_item("spline16");
            m_filters.add_item("spline36");
            m_filters.add_item("hanning");
            m_filters.add_item("hamming");
            m_filters.add_item("hermite");
            m_filters.add_item("kaiser");
            m_filters.add_item("quadric");
            m_filters.add_item("catrom");
            m_filters.add_item("gaussian");
            m_filters.add_item("bessel");
            m_filters.add_item("mitchell");
            m_filters.add_item("sinc");
            m_filters.add_item("lanczos");
            m_filters.add_item("blackman");
            m_filters.cur_item(1);

            m_filters.border_width(0, 0);
            m_filters.background_color(new RGBA_Doubles(0.0, 0.0, 0.0, 0.1));
            m_filters.text_size(6.0);
            m_filters.text_thickness(0.85);
        }