summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/runpicture.in
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/utils/asymptote/runpicture.in')
-rw-r--r--Build/source/utils/asymptote/runpicture.in31
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);