Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text: support pixel offsets #1392

Closed
swharden opened this issue Oct 21, 2021 · 1 comment · Fixed by #1503
Closed

Text: support pixel offsets #1392

swharden opened this issue Oct 21, 2021 · 1 comment · Fixed by #1503

Comments

@swharden
Copy link
Member

swharden commented Oct 21, 2021

I can place text at a point on the chart using coordinates, and I can adjust its alignment by customizing the font, but I'd love to be able to shift the relative rendering by a specified number of pixels (e.g., 5px offset down and to the right). The Test plot type could have fields like PixelOffsetX and PixelOffsetY which default to 0.

image

Those fields would simply get added to these pixel values here:

float pixelX = dims.GetPixelX(X);
float pixelY = dims.GetPixelY(Y);

@bclehmann
Copy link
Member

bclehmann commented Oct 21, 2021

I could see this being useful for annotations, arrows, and tooltips as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants