summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/base/annotate.asy
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/utils/asymptote/base/annotate.asy')
-rw-r--r--Build/source/utils/asymptote/base/annotate.asy16
1 files changed, 16 insertions, 0 deletions
diff --git a/Build/source/utils/asymptote/base/annotate.asy b/Build/source/utils/asymptote/base/annotate.asy
new file mode 100644
index 00000000000..aba9309cb65
--- /dev/null
+++ b/Build/source/utils/asymptote/base/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);
+}