Skip to content

Ruler and scaling #6090

Answered by darikg
jules-l-jimmy asked this question in Q&A
May 16, 2024 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

It looks like add_ruler sets the range of the ruler to the distance between pointa and pointb. Here's a quick kludge that I think does what you're looking for

ruler = p.add_ruler(...)
a, b = ruler.GetRange()  # Either (0, distance) or (distance, 0)
ruler.SetRange(a / x_ratio, b / x_ratio)

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@jules-l-jimmy
Comment options

@MatthewFlamm
Comment options

@tkoyama010
Comment options

Answer selected by jules-l-jimmy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants