Exemplo n.º 1
0
        // Render (Render the current batch as usual)
        internal void Render()
        {
            // Clear proxy
            _proxy.Clear();

            // Render to proxy
            _layers.Render(_proxy);
            _proxy.SetView(_proxy.DefaultView);

            // Render proxy to target
            using (Sprite sprite = new Sprite(_proxy.Texture)
            {
                Scale = _scale, TextureRect = _flipScale
            })
            {
                _target.Draw(sprite);
                _target.Draw(_renderFix); // Forces SFML to clear (bug work-around)
            }
        }
Exemplo n.º 2
0
 public Task Update(IEnumerable <TExternalDrawable> drawables)
 {
     if (IsOpen)
     {
         context = contextFactory.Create(context);
         foreach (var drawable in drawables)
         {
             drawable.Draw(context);
         }
         renderTarget.Draw(context);
     }
     return(Task.CompletedTask);
 }
Exemplo n.º 3
0
 public void Draw(IRenderTarget renderTarget)
 {
     renderTarget.Draw(Frames[frameNumber], Location);
 }
Exemplo n.º 4
0
        // outdated
        public void RenderText(IRenderTarget destination, Point position, string text, int characterSize, Color color,
            bool bold, bool italic, bool underline)
        {
            UpdateCachedFont(characterSize);
            Texture textTexture = new Texture(cachedFont.Render(text, global::System.Drawing.Color.FromArgb(color.A, color.R, color.G, color.B)));

            destination.Draw(textTexture, position);
        }
Exemplo n.º 5
0
 public void Draw(IRenderTarget target, RenderStates states)
 {
     target.Draw(lines);
     target.Draw(xText);
     target.Draw(yText);
 }