I am using Primitives2D to draw basic shapes like rectangles for debugging. The library uses rectangles (ints) while I use floats for positioning and this causes stuttering when drawing.
I don’t know anything about primitives2d but if its using ints you might have to make your own drawabler ectangle class.
Create one with 4 sides and use the spritebatch draw method that takes floats.
For the source rectangle use a 1 pixel white rectangle (off a spritesheet or create your own texture2d) then use a vector 2 as a scale in the spritebatch draw method. So for the top line if it needs to be 50 pixels wide and 2 pixels high use a vector2 50,2 for the scale
If your using a white pixel you can just change the colour in the spritebath draw method. Eg color.red
Its probably best to first create a single line class that will draw a basic line. Then in your rectangle class include 4 lines in it.