Drawing dashed lines

I find myself needing to draw dashed lines, but I don’t see anything in the Xojo language reference about it. The reference topics “Drawing with Vector Graphics” looked promising, as did Object2D, but I don’t see how I could use them to draw dashed lines. Searching the forum only turned up topics whose content has been deleted, presumably because they’re old or deprecated.

I don’t need anything fancy, I’m just drawing selection rectangles in a graphics.paint event.

Thoughts? Suggestions? Where to look? Approaches to try?

Thanks!

here is a example
https://documentation.xojo.com/api/graphics/graphics.html#graphics-linedashoffset

g.LineDash = Array(2.0, 3.0)
g.LineDashOffset = 1.0
g.DrawLine(0, 0, g.Width, g.Height)

Wow! As usual, I was blind to the obvious when searching. Thank you so much!

1 Like

@John_McKernon I think you put the solution mark in the wrong pace :slight_smile: