summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/asymptote/annotate.asy
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/asymptote/annotate.asy')
-rw-r--r--Master/texmf-dist/asymptote/annotate.asy16
1 files changed, 16 insertions, 0 deletions
diff --git a/Master/texmf-dist/asymptote/annotate.asy b/Master/texmf-dist/asymptote/annotate.asy
new file mode 100644
index 00000000000..aba9309cb65
--- /dev/null
+++ b/Master/texmf-dist/asymptote/annotate.asy
@@ -0,0 +1,16 @@
+void annotate(picture pic=currentpicture, string title, string text,
+ pair position)
+{
+ pic.add(new void(frame f, transform t) {
+ position=t*position;
+ label(f,"\special{!/pdfmark where
+ {pop} {userdict /pdfmark /cleartomark load put} ifelse
+ [/Rect["+(string) position.x+" 0 0 "+(string) position.y+"]
+ /Subtype /Text
+ /Name /Comment
+ /Title ("+title+")
+ /Contents ("+text+")
+ /ANN pdfmark}");
+ },true);
+ draw(pic,position,invisible);
+}