Render() public method

Renders the primtive line object.
public Render ( SpriteRenderer spriteRenderer, SystemManagers managers ) : void
spriteRenderer RenderingLibrary.Graphics.SpriteRenderer The sprite renderer to use to render the primitive line object.
managers SystemManagers
return void
Exemplo n.º 1
0
 void IRenderable.Render(SpriteRenderer spriteRenderer, SystemManagers managers)
 {
     if (AbsoluteVisible)
     {
         mLinePrimitive.Position.X = this.GetAbsoluteLeft();
         mLinePrimitive.Position.Y = this.GetAbsoluteTop();
         mLinePrimitive.Render(spriteRenderer, managers);
     }
 }
Exemplo n.º 2
0
        void IRenderable.Render(SpriteRenderer spriteRenderer, SystemManagers managers)
        {
            UpdatePoints();
            if (Visible)
            {
                Texture2D textureToUse = AssociatedRenderer.SinglePixelTexture;

                if (IsDotted)
                {
                    textureToUse = AssociatedRenderer.DottedLineTexture;
                }

                mLinePrimitive.Render(spriteRenderer, managers, textureToUse, .2f * AssociatedRenderer.Camera.Zoom);
            }
        }
Exemplo n.º 3
0
        public static void RenderLinePrimitive(LinePrimitive linePrimitive, SpriteBatch spriteBatch, IPositionedSizedObject ipso, SystemManagers managers, bool isDotted)
        {
            linePrimitive.Position.X = ipso.GetAbsoluteX();
            linePrimitive.Position.Y = ipso.GetAbsoluteY();

            Renderer renderer;
            if (managers != null)
            {
                renderer = managers.Renderer;
            }
            else
            {
                renderer = Renderer.Self;
            }

            Texture2D textureToUse = renderer.SinglePixelTexture;

            if (isDotted)
            {
                textureToUse = renderer.DottedLineTexture;
            }

            linePrimitive.Render(spriteBatch, managers, textureToUse, .2f * renderer.Camera.Zoom);
        }