Exemple #1
0
 public GUIImage(IDrawspace drawspace, IImage image, IRect2D srcRect = null) : base(drawspace)
 {
     _image      = image;
     _sourceRect = srcRect != null
         ? srcRect
         : Drawspace.Provider.MakeRect2D(
         0, 0, image.Size.X, image.Size.Y);
     _destRect = Drawspace.Provider.MakeRect2D(0, 0, image.Size.X, image.Size.Y);
 }
Exemple #2
0
 public GUIImage(IContainer parent, IImage image, IRect2D srcRect = null) : base(parent)
 {
     _image      = image;
     _sourceRect = srcRect != null
         ? srcRect
         : Drawspace.Provider.MakeRect2D(
         0, 0, image.Size.X, image.Size.Y);
     _destRect = Drawspace.Provider.MakeRect2D(0, 0, image.Size.X, image.Size.Y);
 }
Exemple #3
0
        public IDrawspace GetDrawspace(IRect2D subRect)
        {
            WindowCreateInfo windowCI = new WindowCreateInfo()
            {
                X            = (int)subRect.Position.X,
                Y            = (int)subRect.Position.Y,
                WindowWidth  = (int)subRect.Size.X,
                WindowHeight = (int)subRect.Size.Y,
                WindowTitle  = "Veldrid Tutorial"
            };
            Sdl2Window _window = VeldridStartup.CreateWindow(ref windowCI);

            _windowList.Add(_window);
            _graphicsDevice = VeldridStartup.CreateGraphicsDevice(_window);
            return(new VeldridDrawspace(_window));
        }
Exemple #4
0
 public Window(IRect2D subrect) :
     this(Registry.GetService <IGraphicsProvider>().GetDrawspace(subrect)) // no parent
 {
     //nop
 }
Exemple #5
0
 public IDrawspace GetDrawspace(IRect2D subRect)
 {
     return(new GtkDrawspace(this, (Rect2D)subRect));
 }
Exemple #6
0
 public IWindow GetWindow(string windowName, IRect2D windowRect)
 {
     return(new Window(_graphicsProvider.GetDrawspace(windowRect)));
 }
Exemple #7
0
 public void PushClip(IRect2D cipRect)
 {
     throw new System.NotImplementedException();
 }