-
Notifications
You must be signed in to change notification settings - Fork 62
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
Using Measures anywhere #208
Comments
At least in the current design, it's only possible to use I'd probably write a function which takes the polygon description, including any scale factor, and draws both the polygon and the labels, so that no further scaling is needed after that. |
Oh, but these are point-like in the sense that I'm not interested in doing anything with their What is the current story for labels? I think I read somewhere that improvements are planned. |
@jeffreyrosenbluth Are you planning some way of labeling arrows? It's possible the fixpoint changes (which I hear are coming early next year) will provide a framework for this sort of thing, where you take responsibility for ensuring that the recursion converges / terminates. In the meantime, you can roll your own by putting some sort of placeholder (which conveys orientation and angle) with a point envelope in the Diagram when you define the polygon. Walk the diagram before rendering, and replace each placeholder with a suitably scaled Path. |
@bergey I feel pretty strongly that labeling should not be limited to arrows. I.e. we should design a labeling API more generally so that any diagram could be labeled. For example we should be able to label the edges and vertices of a polygon, tree, graph, etc. I have spent some time looking at how this is done in the TeX world, e.g. Asymptote and TikZ but the "relative" nature of composition in diagrams makes these examples less than helpful. I think the place to start is to have a discussion about design, perhaps a wiki entry. I'll try to start one in the next few days. |
Sounds great, thanks. |
I want to create a function that labels the angles of a polygon. The arcs (and for right angles, squares) that mark the angles should not scale with the polygon, neither should the user have to specify their size each time. The same goes for labels. I want to put labels beside each mark, which is simple using cat', but the separation between the arc and the text shouldn't have to be hardcoded.
I want to be able to make stuff using
Measure
s, just likefontSize
,lineWidth
, etc. But I can't figure out how to do this.ScaleInv
might help, but I want the marks' size to change dynamically with the size of the output.The text was updated successfully, but these errors were encountered: