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

Scale on picture does not propagate to labels #45

Closed
marenamat opened this issue Oct 26, 2017 · 1 comment
Closed

Scale on picture does not propagate to labels #45

marenamat opened this issue Oct 26, 2017 · 1 comment

Comments

@marenamat
Copy link

When a label is put into picture and then a scale is applied on that picture, the label does not scale the right way.

Minimal Reproducer:

picture pic;
label(pic, Label("G"), (0,0));
shipout("pic", yscale(-1) * bpic);

Suggested patch:

diff --git a/base/plain_Label.asy b/base/plain_Label.asy
index 1e424ab1..96861218 100644
--- a/base/plain_Label.asy
+++ b/base/plain_Label.asy
@@ -294,7 +294,7 @@ struct Label {
     align=length(align)*unit(rotation(t)*align);
     pair S=t*position+align*labelmargin(p0)+shift(T)*0;
     if(settings.tex != "none")
-      label(f,s,size,embed(t)*shiftless(T),S,align,p0);
+      label(f,s,size,t*shiftless(T),S,align,p0);
     else
       fill(f,align(texpath(s,p0),S,align,p0),p0);
   }
@johncbowman
Copy link
Member

See http://asymptote.sourceforge.net/doc/label.html#index-Label-1. Here is an example:

picture pic;
label(pic, Label("G",embed=Scale), (0,0));
shipout("pic", yscale(-1) * pic);

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

No branches or pull requests

2 participants