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/runpicture.in | |
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/runpicture.in')
-rw-r--r-- | Build/source/utils/asymptote/runpicture.in | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/Build/source/utils/asymptote/runpicture.in b/Build/source/utils/asymptote/runpicture.in index b0540ae6def..232c4229a17 100644 --- a/Build/source/utils/asymptote/runpicture.in +++ b/Build/source/utils/asymptote/runpicture.in @@ -114,6 +114,12 @@ pair max(picture *f) return f->bounds().Max(); } +pair size(picture *f) +{ + bbox b=f->bounds(); + return b.Max()-b.Min(); +} + void _draw(picture *f, path g, pen p) { f->append(new drawPath(g,p)); @@ -126,10 +132,12 @@ void fill(picture *f, patharray *g, pen p=CURRENTPEN, bool copy=true) } void latticeshade(picture *f, patharray *g, bool stroke=false, - pen fillrule=CURRENTPEN, penarray2 *p, bool copy=true) + pen fillrule=CURRENTPEN, penarray2 *p, transform t=identity, + bool copy=true) { array *(*copyarray)(array *a)=copy ? copyArray: nop; - f->append(new drawLatticeShade(*copyarray(g),stroke,fillrule,*copyarray(p))); + f->append(new drawLatticeShade(*copyarray(g),stroke,fillrule,*copyarray(p), + t)); } void axialshade(picture *f, patharray *g, bool stroke=false, pen pena, pair a, @@ -408,9 +416,9 @@ void shipout3(string prefix, picture *f, string format=emptystring, real* Background=copyArrayC(background); triple *Lights=copyTripleArrayC(lights); - real *Diffuse=copyArray2C(diffuse,false,4); - real *Ambient=copyArray2C(ambient,false,4); - real *Specular=copyArray2C(specular,false,4); + real *Diffuse=copyArray2C(diffuse,false,4,UseGC); + real *Ambient=copyArray2C(ambient,false,4,UseGC); + real *Specular=copyArray2C(specular,false,4,UseGC); f->shipout3(prefix,format,width,height,angle,zoom,m,M,shift,T,Background,n, Lights,Diffuse,Ambient,Specular,viewportlighting,view); @@ -568,6 +576,13 @@ void draw(picture *f, triplearray2 *P, triple center, bool straight, name,interaction)); } +// General NURBS curve +void draw(picture *f, triplearray *P, realarray *knot, + realarray *weights=emptyarray, pen p, string name=emptystring) +{ + f->append(new drawNurbsPath3(*P,knot,weights,p,name)); +} + // General NURBS surface void draw(picture *f, triplearray2 *P, realarray *uknot, realarray *vknot, realarray2 *weights=emptyarray, penarray *p, @@ -588,6 +603,12 @@ triple max3(picture *f) return f->bounds3().Max(); } +triple size3(picture *f) +{ + bbox3 b=f->bounds3(); + return b.Max()-b.Min(); +} + pair minratio(picture *f) { return f->ratio(::min); |