Пример #1
0
        public static EaseViewport CreateViewportControl(PixelFarm.Forms.Form hostForm, int w, int h)
        {
            LayoutFarm.UI.WinNeutral.UISurfaceViewportControl viewport;
            CreateNewFormCanvas(w, h, hostForm,
                                useOpenGL ? InnerViewportKind.GL : InnerViewportKind.GdiPlus,
                                out viewport);
            viewport.PaintMe();
            EaseViewport easeViewport = new EaseViewport(viewport);

            return(easeViewport);
        }
Пример #2
0
 public Form1()
 {
     InitializeComponent();
     //1. create viewport
     easeViewport = EaseHost.CreateViewportControl(this, 800, 600);
     //2. add physical html control to target that you want
     //eg. this example add physical html control viewport to the panel1
     this.panel1.Controls.Add(easeViewport.PhysicalViewportControl);
     //3. notify when form load
     this.Load += new EventHandler(Form1_Load);
     //4. create html output console
     this.myWbConsole = new MyWebConsole(this.textBox1);
 }
Пример #3
0
        public static EaseViewport CreateViewportControl(Form hostForm, int w, int h)
        {
            var rootgfx = new MyRootGraphic(uiPlatformWinForm,
                                            w, h);

            LayoutFarm.UI.UISurfaceViewportControl viewport;
            CreateNewFormCanvas(hostForm, rootgfx,
                                useOpenGL ? InnerViewportKind.GL : InnerViewportKind.GdiPlus,
                                out viewport);
            viewport.PaintMe();
            EaseViewport easeViewport = new EaseViewport(viewport);

            return(easeViewport);
        }
Пример #4
0
 public static EaseViewport CreateViewportControl(Form hostForm, int w, int h)
 {
     var rootgfx = new MyRootGraphic(uiPlatformWinForm, 
         w, h);
     LayoutFarm.UI.UISurfaceViewportControl viewport;
     CreateNewFormCanvas(hostForm, rootgfx,
          useOpenGL ? InnerViewportKind.GL : InnerViewportKind.GdiPlus,
          out viewport);
     viewport.PaintMe();
     EaseViewport easeViewport = new EaseViewport(viewport);
     return easeViewport;
 }