public UISurfaceViewportControl CreateNewOne(int w, int h)
{
//each viewport has its own root graphics
UISurfaceViewportControl newViewportControl = new UISurfaceViewportControl();
newViewportControl.Size = new System.Drawing.Size(w, h);
RootGraphic newRootGraphic = this.rootgfx.CreateNewOne(w, h);
ITopWindowEventRoot topEventRoot = null;
if (newRootGraphic is ITopWindowEventRootProvider)
{
topEventRoot = ((ITopWindowEventRootProvider)newRootGraphic).EventRoot;
}
newViewportControl.InitRootGraphics(
newRootGraphic,//new root
topEventRoot,
this.innerViewportKind);
return newViewportControl;
}
//-----------