Monogame draw dash line --- --- ---

Hello there. I need to draw solid, dotted and dashed lines in momogame. Maybe someone can help me to decide this complicated question ? Thank you.

There is no built-in way to do this, so you have to implement it yourself. One approach is to draw a very narrow quad with a texture containing the dotted or dashed pattern. Make the texture repeat and you will have your patterned line.

No problem to make a texture repeating, when i draw vertical or horizonal lines, but, when i’m trying to draw tilted lines - it’s hard to do, because texture didn’t tiling with direction from begin to end of drawing line.
Maybe i make it in differ way, i don’t know. Maybe you can tell me how to make a texture repeat propertly. Thanks.