public IRenderingSurface CreateRenderingSurface(IntPtr windowID, int width, int height, RenderingSurfaceType type)
		{
			if (_surface == null)
				_surface = new VtkRenderingSurface(windowID);
			else
				_surface.WindowID = windowID;

			_surface.ClientRectangle = new Rectangle(0, 0, width, height);

			return _surface;
		}
예제 #2
0
			public IRenderingSurface CreateRenderingSurface(IntPtr windowId, int width, int height, RenderingSurfaceType type)
			{
				return Wrapper.Item.CreateRenderingSurface(windowId, width, height, type);
			}
예제 #3
0
 IRenderingSurface IRenderer.CreateRenderingSurface(IntPtr windowId, int width, int height, RenderingSurfaceType type)
 {
     return(CreateRenderingSurface(windowId, width, height, type));
 }
예제 #4
0
 /// <summary>
 /// Factory method to create an <see cref="IRenderingSurface"/> instance appropriate for this renderer.
 /// </summary>
 public abstract TRenderingSurface CreateRenderingSurface(IntPtr windowId, int width, int height, RenderingSurfaceType type);
예제 #5
0
        public override IVtkRenderingSurface CreateRenderingSurface(IntPtr windowId, int width, int height, RenderingSurfaceType type)
        {
            var clientRectangle = new Rectangle(0, 0, width, height);

            switch (Environment.OSVersion.Platform)
            {
            case PlatformID.Win32NT:
                return(new Win32VtkRenderingSurface(windowId, type == RenderingSurfaceType.Offscreen)
                {
                    ClientRectangle = clientRectangle
                });

            case PlatformID.Unix:
            case PlatformID.Xbox:
            case PlatformID.MacOSX:
                throw new NotSupportedException();

            case PlatformID.WinCE:
            case PlatformID.Win32S:
            case PlatformID.Win32Windows:
                // legacy platforms that will likely never be supported
                throw new NotSupportedException();

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
예제 #6
0
 /// <summary>
 /// Initializes a <see cref="RenderingSurfaceBase"/>.
 /// </summary>
 /// <param name="type">The type of rendering surface.</param>
 protected RenderingSurfaceBase(RenderingSurfaceType type)
 {
     _type = type;
 }
예제 #7
0
 public virtual IRenderingSurface CreateRenderingSurface(IntPtr windowId, int width, int height, RenderingSurfaceType type)
 {
     return(GetRenderingSurface(windowId, width, height));
 }
예제 #8
0
 public IRenderingSurface CreateRenderingSurface(IntPtr windowId, int width, int height, RenderingSurfaceType type)
 {
     return(Wrapper.Item.CreateRenderingSurface(windowId, width, height, type));
 }
        public IRenderingSurface CreateRenderingSurface(IntPtr windowID, int width, int height, RenderingSurfaceType type)
        {
            if (_surface == null)
            {
                _surface = new VtkRenderingSurface(windowID);
            }
            else
            {
                _surface.WindowID = windowID;
            }

            _surface.ClientRectangle = new Rectangle(0, 0, width, height);

            return(_surface);
        }
예제 #10
0
		public virtual IRenderingSurface CreateRenderingSurface(IntPtr windowId, int width, int height, RenderingSurfaceType type)
		{
			return GetRenderingSurface(windowId, width, height);
		}