One commonality of the annotations we create is that the background is often transparent. This is a nice feature, but can be an issue when the anchor point is in the center. Since we draw the line from the anchor point to the text, the line passes through our text, and is not good to look at. Our old graphing library would draw the line from the corner nearest to the target point.
This isn't exactly complicated stuff, so I wouldn't mind implementing it, but I need to ask some questions first.
Does Arction have any desires to implement a feature like this? If so, I would not do the work, because there is no point duplicating effort.
My intuition tells me to convert the target point and anchor point to the same coordinate system. This way I could perfom some logic to determine which corner offers the shortest line.
Do you have any advice for getting these 2 points into the same coordinate system?
Thanks for your response.
Annotation anchor to snap to corner nearest target point.
Moderator: Queue Moderators
Re: Annotation anchor to snap to corner nearest target point
Since the anchor is used for more than just drawing the line, is there a way I could unhook the the line from the anchor?
Or, if you guys end up doing it, maybe add a flag that sets the line to draw from the target point, to the nearest point on the text box?
Or, if you guys end up doing it, maybe add a flag that sets the line to draw from the target point, to the nearest point on the text box?
- ArctionPasi
- Posts: 1367
- Joined: Tue Mar 26, 2013 10:57 pm
- Location: Finland
- Contact:
Re: Annotation anchor to snap to corner nearest target point
The best way to achieve this is by doing it with a stencil test of Direct3D. Excluding the annotation rectangle when rendering the line.
It isn't very easy to implement, so I think it's best if we do it.
It isn't very easy to implement, so I think it's best if we do it.
LightningChart Support Team, PT