diff options
author | Karl Berry <karl@freefriends.org> | 2010-04-19 23:59:33 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-04-19 23:59:33 +0000 |
commit | dddce3148a2bc785603576b18ffcf72d39adbe47 (patch) | |
tree | 14f4c79ef11bcf0820a8d4ff2ab0c5ac009c365c /Build/source/utils/asymptote/drawverbatim.h | |
parent | a01e51b01f5819b6091af48cdca581e9f2a9282e (diff) |
asy 1.93
git-svn-id: svn://tug.org/texlive/trunk@17934 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/drawverbatim.h')
-rw-r--r-- | Build/source/utils/asymptote/drawverbatim.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/Build/source/utils/asymptote/drawverbatim.h b/Build/source/utils/asymptote/drawverbatim.h index 24c5be45d14..186dc544422 100644 --- a/Build/source/utils/asymptote/drawverbatim.h +++ b/Build/source/utils/asymptote/drawverbatim.h @@ -18,20 +18,26 @@ class drawVerbatim : public drawElement { private: Language language; string text; - bool havebounds; + bool userbounds; pair min,max; + bool havebounds; public: drawVerbatim(Language language, const string& text) : - language(language), text(text), havebounds(false) {} + language(language), text(text), userbounds(false), havebounds(false) {} drawVerbatim(Language language, const string& text, pair min, pair max) : - language(language), text(text), havebounds(true), min(min), max(max) {} + language(language), text(text), userbounds(true), min(min), max(max), + havebounds(false) {} virtual ~drawVerbatim() {} - void bounds(bbox& b, iopipestream&, boxvector&, bboxlist&) { - if(havebounds) { + void bounds(bbox& b, iopipestream& tex, boxvector&, bboxlist&) { + if(havebounds) return; + havebounds=true; + if(language == TeX) + tex << text << "%" << newl; + if(userbounds) { b += min; b += max; } |