I just started learning monogame a couple of days ago and I was wondering how I can draw a line from a Start Vector2 and an End Vector2 with a specific line thickness?
Should I use a one pixel image to draw it onto the screen and then use a Bresenham's line algorithm to find there positions, or is there a more optimized and less complicated method to do this using monogames built in functions?

One way is to create a
Texture2Dwith a width that is the distance between the twoVector2s and a height that is the desired width. Then you apply a rotation to the texture when you draw it.Here is an example (as a
SpriteBatchextension method):Example of use:
How it looks:
It's not a perfect solution. You'll want to modify it if you want to draw connected lines with different angles without any visible seams. Also not sure about the performance.