Exemplo n.º 1
0
 protected override void OnRender(Nine.Graphics.UI.Renderer.Renderer renderer)
 {
     if (Content != null)
     {
         Content.Render(renderer);
     }
 }
Exemplo n.º 2
0
 protected override void OnRender(Nine.Graphics.UI.Renderer.Renderer renderer)
 {
     foreach (var child in children)
     {
         child.Render(renderer);
     }
 }
Exemplo n.º 3
0
 protected override void OnRender(Nine.Graphics.UI.Renderer.Renderer renderer)
 {
     if (this.Source != null)
     {
         renderer.Draw(Source, AbsoluteRenderTransform, null, Color.White, Flip);
     }
 }
Exemplo n.º 4
0
        protected override void OnRender(Nine.Graphics.UI.Renderer.Renderer renderer)
        {
            if (player.State != MediaState.Stopped)
            {
                Texture = player.GetTexture();
            }

            if (Texture != null)
            {
                renderer.Draw(Texture, AbsoluteRenderTransform, null, Color.White, Flip);
            }
        }
Exemplo n.º 5
0
        protected override void OnRender(Nine.Graphics.UI.Renderer.Renderer renderer)
        {
            if (Font == null)
            {
                return;
            }
            // throw new ArgumentNullException("Font");

            var TextColor = Foreground != null ? (Color)this.Foreground : Color.Black;

            TextStartPosition = new Vector2(this.Padding.Left, this.Padding.Top) + AbsoluteVisualOffset;
            var text = formattedText != null ? formattedText : Text;

            renderer.DrawString(Font, text, TextStartPosition, TextColor, 0, Vector2.Zero, FontSize);
        }
Exemplo n.º 6
0
        protected override void OnRender(Nine.Graphics.UI.Renderer.Renderer renderer)
        {
            switch (Orientation)
            {
            case Controls.Orientation.Horizontal:
                var HorzBar = AbsoluteRenderTransform;
                HorzBar       = HorzBar.Deflate(Padding);
                HorzBar.Width = HorzBar.Width * ((Value - Minimum) / (Maximum - Minimum));
                renderer.Draw(HorzBar, BarBrush);
                break;

            case Controls.Orientation.Vertical:     // Should I make this top to down?
                var VertBar = AbsoluteRenderTransform;
                VertBar        = VertBar.Deflate(Padding);
                VertBar.Height = VertBar.Height * ((Value - Minimum) / (Maximum - Minimum));
                renderer.Draw(VertBar, BarBrush);
                break;
            }
        }
Exemplo n.º 7
0
 protected override void OnRender(Nine.Graphics.UI.Renderer.Renderer renderer)
 {
     this.ItemsPanel.Render(renderer);
 }