C# Class MonoGameFoundation.PrimitiveExtensions

Extension methods that draw 2D primitives.
Show file Open project: half-ogre/MonoGameQuest

Public Methods

Method Description
DrawLine ( this spriteBatch, Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 start, Vector2 end, int lineWidth = 1 ) : void

Draws a line between two positions.

DrawLine ( this spriteBatch, Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 point, float length, float angle, int lineWidth = 1 ) : void

Draws a line starting from the specified position, at the specified angle, with the specified length.

Method Details

DrawLine() public static method

Draws a line between two positions.
public static DrawLine ( this spriteBatch, Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 start, Vector2 end, int lineWidth = 1 ) : void
spriteBatch this The sprite batch with which to draw the line
texture Microsoft.Xna.Framework.Graphics.Texture2D The texture with which to draw the line
start Vector2 The line's start position
end Vector2 The line's end position
lineWidth int The line's width
return void

DrawLine() public static method

Draws a line starting from the specified position, at the specified angle, with the specified length.
public static DrawLine ( this spriteBatch, Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 point, float length, float angle, int lineWidth = 1 ) : void
spriteBatch this The sprite batch with which to draw the line
texture Microsoft.Xna.Framework.Graphics.Texture2D The texture with which to draw the line
point Vector2 The point at which to start the line
length float The line's length
angle float The angle at which to draw the line
lineWidth int The line's width
return void