Esempio n. 1
0
 protected override void OnRender(Nine.Graphics.UI.Renderer.Renderer renderer)
 {
     if (this.Source != null)
     {
         renderer.Draw(Source, AbsoluteRenderTransform, null, Color.White, Flip);
     }
 }
Esempio n. 2
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;
            }
        }
Esempio n. 3
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);
            }
        }