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;
		}
			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));
 }
 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);
		}