PaintMe() public method

public PaintMe ( ) : void
return void
コード例 #1
0
        private void ListBox3_MouseDown1(object sender, System.Windows.Forms.MouseEventArgs e)
        {
#if DEBUG
            dbugLayoutMsg msg = listBox3.SelectedItem as dbugLayoutMsg;
            if (msg == null)
            {
                return;
            }
            switch (msg.msgOwnerKind)
            {
            case dbugLayoutMsgOwnerKind.Layer:
            {
                RenderElementLayer layer = (RenderElementLayer)msg.owner;
            }
            break;

            case dbugLayoutMsgOwnerKind.Line:
            {
            }
            break;

            case dbugLayoutMsgOwnerKind.VisualElement:
            {
                RenderElement ve = (RenderElement)msg.owner;
                dbugHelper01.dbugVE_HighlightMe = ve;
                lastestSelectVE = ve;

                vwport.PaintMe();
            }
            break;
            }
#endif
        }
コード例 #2
0
ファイル: EaseHost.cs プロジェクト: asmboom/HtmlRenderer
        static void CreateReadyForm(
            out LayoutFarm.UI.UISurfaceViewportControl viewport,
            out Form formCanvas)
        {
            int w = 800;
            int h = 600;

            var rootgfx = new MyRootGraphic(uiPlatformWinForm,
                                            useOpenGL ? openGLPlatform : gdiPlatform,
                                            w, h);

            var topRenderBox = rootgfx.TopWindowRenderBox;


            formCanvas = FormCanvasHelper.CreateNewFormCanvas(rootgfx,
                                                              useOpenGL ? InnerViewportKind.GL : InnerViewportKind.GdiPlus,
                                                              out viewport);

            formCanvas.Text = "FormCanvas 1";

            viewport.PaintMe();

            formCanvas.WindowState = FormWindowState.Maximized;
            formCanvas.Show();
        }
コード例 #3
0
ファイル: Form1.cs プロジェクト: asmboom/HtmlRenderer
        private void cmdShowEmbededViewport_Click(object sender, EventArgs e)
        {
            Form simpleForm = new Form();

            simpleForm.Text        = "SimpleForm2";
            simpleForm.WindowState = FormWindowState.Maximized;
            Rectangle screenClientAreaRect = Screen.PrimaryScreen.WorkingArea;
            var       viewport             = new LayoutFarm.UI.UISurfaceViewportControl();

            viewport.Bounds = new Rectangle(0, 0, screenClientAreaRect.Width, screenClientAreaRect.Height);
            simpleForm.Controls.Add(viewport);

            int w = 800;
            int h = 600;



            var rootgfx = new MyRootGraphic(this.uiPlatformWinForm,
                                            this.gfxPlatform, w, h);

            viewport.InitRootGraphics(rootgfx, rootgfx.TopWinEventPortal,
                                      InnerViewportKind.GdiPlus);

            viewport.PaintMe();

            simpleForm.Show();

            ShowFormLayoutInspector(viewport);
        }
コード例 #4
0
        public void RunDemo(DemoBase selectedDemo)
        {
            YourImplementation.DemoFormCreatorHelper.CreateReadyForm(out _latestviewport, out _latest_formCanvas);

            selectedDemo.StartDemo(new SampleViewport(_latestviewport));
            _latestviewport.TopDownRecalculateContent();
            //==================================================
            _latestviewport.PaintMe();

            if (this.chkShowLayoutInspector.Checked)
            {
                ShowFormLayoutInspector(_latestviewport);
            }

            if (this.chkShowFormPrint.Checked)
            {
                ShowFormPrint(_latestviewport);
            }
        }
コード例 #5
0
ファイル: Form1.cs プロジェクト: prepare/HTML-Renderer
 private void cmdShowEmbededViewport_Click(object sender, EventArgs e)
 {
     Form simpleForm = new Form();
     simpleForm.Text = "SimpleForm2";
     simpleForm.WindowState = FormWindowState.Maximized;
     Rectangle screenClientAreaRect = Screen.PrimaryScreen.WorkingArea;
     var viewport = new LayoutFarm.UI.UISurfaceViewportControl();
     viewport.Bounds = new Rectangle(0, 0, screenClientAreaRect.Width, screenClientAreaRect.Height);
     simpleForm.Controls.Add(viewport);
     int w = 800;
     int h = 600;
     var rootgfx = new MyRootGraphic(this.uiPlatformWinForm, 
         w, h);
     viewport.InitRootGraphics(rootgfx, rootgfx.TopWinEventPortal,
         InnerViewportKind.GdiPlus);
     viewport.PaintMe();
     simpleForm.Show();
     ShowFormLayoutInspector(viewport);
 }
コード例 #6
0
        public void RunDemo(DemoBase selectedDemo)
        {
            Form formCanvas;

            CreateReadyForm(out viewport, out formCanvas);

            selectedDemo.StartDemo(new SampleViewport(viewport));
            viewport.TopDownRecalculateContent();
            //==================================================
            viewport.PaintMe();

            if (this.chkShowLayoutInspector.Checked)
            {
                ShowFormLayoutInspector(viewport);
            }

            if (this.chkShowFormPrint.Checked)
            {
                ShowFormPrint(viewport);
            }
        }
コード例 #7
0
        public static void CreateReadyForm(
            out LayoutFarm.UI.UISurfaceViewportControl viewport,
            out Form formCanvas)
        {
            //1. select view port kind
            InnerViewportKind innerViewportKind = InnerViewportKind.GdiPlus;

            var workingArea = Screen.PrimaryScreen.WorkingArea;

            formCanvas = FormCanvasHelper.CreateNewFormCanvas(
                workingArea.Width,
                workingArea.Height,
                innerViewportKind,
                out viewport);

            formCanvas.Text = "FormCanvas 1 :" + innerViewportKind;

            viewport.PaintMe();

            formCanvas.WindowState = FormWindowState.Maximized;
            formCanvas.Show();
        }
コード例 #8
0
        public void RunDemo(App app)
        {
            //1. create blank form
            YourImplementation.DemoFormCreatorHelper.CreateReadyForm(
                (InnerViewportKind)lstPlatformSelectors.SelectedItem,
                out _latestviewport, out _latest_formCanvas);

            AppHostWinForm appHost = new AppHostWinForm();

            appHost.SetUISurfaceViewportControl(_latestviewport);

            _latest_formCanvas.FormClosed += (s, e) =>
            {
                //when owner form is disposed
                //we should clear our resource?
                app.OnClosing();
                app.OnClosed();
                _latest_formCanvas = null;
                _latestviewport    = null;
            };


            //2. create app host
            appHost.StartApp(app);
            _latestviewport.TopDownRecalculateContent();
            _latestviewport.PaintMe();


            //==================================================
            if (this.chkShowLayoutInspector.Checked)
            {
                YourImplementation.LayoutInspectorUtils.ShowFormLayoutInspector(_latestviewport);
            }

            if (this.chkShowFormPrint.Checked)
            {
                ShowFormPrint(_latestviewport);
            }
        }
コード例 #9
0
        void CreateReadyForm(
            out LayoutFarm.UI.UISurfaceViewportControl viewport,
            out Form formCanvas)
        {
            var workingArea = Screen.PrimaryScreen.WorkingArea;
            int w           = workingArea.Width;
            int h           = workingArea.Height;


            MyRootGraphic rootgfx = new MyRootGraphic(this.uiPlatformWinForm,
                                                      this.chkUseGLCanvas.Checked ? openGLPlatform : gdiPlatform,
                                                      w, h);

            formCanvas = FormCanvasHelper.CreateNewFormCanvas(rootgfx,
                                                              this.chkUseGLCanvas.Checked ? InnerViewportKind.GL : InnerViewportKind.GdiPlus,
                                                              out viewport);

            formCanvas.Text = "FormCanvas 1";

            viewport.PaintMe();

            formCanvas.WindowState = FormWindowState.Maximized;
            formCanvas.Show();
        }