I'm working on a flowchart application, and need to define the click-able region for a shape connector (line-segment).
To do this, I a need to generate the vertexes for an oriented rectangle that fully encloses an arbitrary line. In addition, I need to be able to specify some padding (in pixels) such that the resulting rectangle will be slightly larger than the line.
The code below is the closest solution I have found, but the resulting rectangle does not include the padding at the end of the line, only at the sides.
The image below illustrates the difference between what the GetSegmentBounds function does and what I need it to do.