コード例 #1
0
ファイル: GamePlatform.cs プロジェクト: MichealWen/sharpmapv2
        public override void OnInitialize()
        {
            int          FrameRateOffset       = -15;
            RGBA_Doubles FrameRateControlColor = new RGBA_Doubles(.2, .2, .2, 1);

            m_PotentialDrawsBudgetPosition = MatrixFactory <T> .CreateVector2D(M.New <T>(10), height().Add(FrameRateOffset));

            m_ShowPotentialDrawsBudgetGraph = new AGG.UI.cbox_ctrl <T>(m_PotentialDrawsBudgetPosition[0], m_PotentialDrawsBudgetPosition[1], "D:0.0");
            m_ShowPotentialDrawsBudgetGraph.text_color(FrameRateControlColor);
            m_ShowPotentialDrawsBudgetGraph.inactive_color(FrameRateControlColor);
            AddChild(m_ShowPotentialDrawsBudgetGraph);
            m_PotentialDrawsBudgetGraph = new DataViewGraph <T>(m_PotentialDrawsBudgetPosition, 100, 100);

            m_PotentialUpdatesBudgetPosition = MatrixFactory <T> .CreateVector2D(M.New <T>(115), height().Add(FrameRateOffset));

            m_ShowPotentialUpdatesBudgetGraph = new AGG.UI.cbox_ctrl <T>(m_PotentialUpdatesBudgetPosition[0], m_PotentialUpdatesBudgetPosition[1], "U:0.0");
            m_ShowPotentialUpdatesBudgetGraph.text_color(FrameRateControlColor);
            m_ShowPotentialUpdatesBudgetGraph.inactive_color(FrameRateControlColor);
            AddChild(m_ShowPotentialUpdatesBudgetGraph);
            m_PotentialUpdatesBudgetGraph = new DataViewGraph <T>(m_PotentialUpdatesBudgetPosition, 100, 100);

            m_ActualDrawsBudgetPosition = MatrixFactory <T> .CreateVector2D(M.New <T>(220), height().Add(FrameRateOffset));

            m_ShowActualDrawsBudgetGraph = new AGG.UI.cbox_ctrl <T>(m_ActualDrawsBudgetPosition[0], m_ActualDrawsBudgetPosition[1], "A:0.0");
            m_ShowActualDrawsBudgetGraph.text_color(FrameRateControlColor);
            m_ShowActualDrawsBudgetGraph.inactive_color(FrameRateControlColor);
            AddChild(m_ShowActualDrawsBudgetGraph);
            m_ActualDrawsBudgetGraph = new DataViewGraph <T>(m_ActualDrawsBudgetPosition, 100, 100);

            base.OnInitialize();
        }
コード例 #2
0
 public override void OnInitialize()
 {
     m_SuperFast = new AGG.UI.cbox_ctrl <T>(M.New <T>(10), M.New <T>(10), "Run Super Fast");
     AddChild(m_SuperFast);
     m_Controller = new CController <T>(rbuf_window(), 30, 40, .1, .7, .3, 4, 1, 2000);
     base.OnInitialize();
 }
コード例 #3
0
        public rounded_rect_application(PixelFormats format, ERenderOrigin RenderOrigin)
            : base(format, RenderOrigin)
        {
            m_idx                   = (-1);
            m_radius                = new AGG.UI.SliderWidget <T>(10, 10, 600 - 10, 19);
            m_gamma                 = new AGG.UI.SliderWidget <T>(10, 10 + 20, 600 - 10, 19 + 20);
            m_offset                = new AGG.UI.SliderWidget <T>(10, 10 + 40, 600 - 10, 19 + 40);
            m_white_on_black        = new cbox_ctrl <T>(10, 10 + 60, "White on black");
            m_DrawAsOutlineCheckBox = new cbox_ctrl <T>(10 + 180, 10 + 60, "Fill Rounded Rect");

            m_x[0] = M.New <T>(100); m_y[0] = M.New <T>(100);
            m_x[1] = M.New <T>(500); m_y[1] = M.New <T>(350);
            AddChild(m_radius);
            AddChild(m_gamma);
            AddChild(m_offset);
            AddChild(m_white_on_black);
            AddChild(m_DrawAsOutlineCheckBox);
            m_gamma.label("gamma={0:F3}");
            m_gamma.range(0.0, 3.0);
            m_gamma.value(1.8);

            m_radius.label("radius={0:F3}");
            m_radius.range(0.0, 50.0);
            m_radius.value(25.0);

            m_offset.label("subpixel offset={0:F3}");
            m_offset.range(-2.0, 3.0);

            m_white_on_black.text_color(new RGBA_Bytes(127, 127, 127));
            m_white_on_black.inactive_color(new RGBA_Bytes(127, 127, 127));

            m_DrawAsOutlineCheckBox.text_color(new RGBA_Doubles(.5, .5, .5));
            m_DrawAsOutlineCheckBox.inactive_color(new RGBA_Bytes(127, 127, 127));
        }
コード例 #4
0
 public component_rendering_application(PixelFormats format, ERenderOrigin RenderOrigin)
     : base(format, RenderOrigin)
 {
     m_alpha = new AGG.UI.SliderWidget <T>(5, 5, 320 - 5, 10 + 5);
     m_UseBlackBackground = new UI.cbox_ctrl <T>(5, 5 + 18, "Draw Black Background");
     m_alpha.label("Alpha={0:F0}");
     m_alpha.range(0, 255);
     m_alpha.value(255);
     AddChild(m_alpha);
     AddChild(m_UseBlackBackground);
     m_UseBlackBackground.text_color(new RGBA_Bytes(127, 127, 127));
 }
コード例 #5
0
ファイル: lion_outline.cs プロジェクト: MichealWen/sharpmapv2
        public lion_outline_application(PixelFormats format, ERenderOrigin RenderOrigin)
            : base(format, RenderOrigin)
        {
            m_width_slider = new AGG.UI.SliderWidget <T>(5, 5, 150, 12);
            m_scanline     = new AGG.UI.cbox_ctrl <T>(160, 5, "Use Scanline Rasterizer");
            m_scanline.status(true);
            parse_lion();
            AddChild(m_width_slider);
            m_width_slider.SetTransform(MatrixFactory <T> .NewIdentity(VectorDimension.Two));
            m_width_slider.range(0.0, 4.0);
            m_width_slider.value(1.0);
            m_width_slider.label("Width {0:F2}");

            AddChild(m_scanline);
            m_scanline.SetTransform(MatrixFactory <T> .NewIdentity(VectorDimension.Two));
        }