summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/asymptote/plain_markers.asy
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/asymptote/plain_markers.asy')
-rw-r--r--Master/texmf-dist/asymptote/plain_markers.asy25
1 files changed, 14 insertions, 11 deletions
diff --git a/Master/texmf-dist/asymptote/plain_markers.asy b/Master/texmf-dist/asymptote/plain_markers.asy
index 42b4e8a036c..250e1701eb3 100644
--- a/Master/texmf-dist/asymptote/plain_markers.asy
+++ b/Master/texmf-dist/asymptote/plain_markers.asy
@@ -305,13 +305,16 @@ pair[] pairs(real[] x, real[] y)
return sequence(new pair(int i) {return (x[i],y[i]);},x.length);
}
-void dot(frame f, pair z, pen p=currentpen, filltype filltype=Fill)
+filltype dotfilltype = Fill;
+
+void dot(frame f, pair z, pen p=currentpen, filltype filltype=dotfilltype)
{
if(filltype == Fill)
draw(f,z,dotsize(p)+p);
else {
- transform t=shift(z);
- path g=t*scale(0.5*(dotsize(p)-linewidth(p)))*unitcircle;
+ real s=0.5*(dotsize(p)-linewidth(p));
+ if(s <= 0) return;
+ path g=shift(z)*scale(s)*unitcircle;
begingroup(f);
filltype.fill(f,g,p);
draw(f,g,p);
@@ -320,7 +323,7 @@ void dot(frame f, pair z, pen p=currentpen, filltype filltype=Fill)
}
void dot(picture pic=currentpicture, pair z, pen p=currentpen,
- filltype filltype=Fill)
+ filltype filltype=dotfilltype)
{
pic.add(new void(frame f, transform t) {
dot(f,t*z,p,filltype);
@@ -329,7 +332,7 @@ void dot(picture pic=currentpicture, pair z, pen p=currentpen,
}
void dot(picture pic=currentpicture, Label L, pair z, align align=NoAlign,
- string format=defaultformat, pen p=currentpen, filltype filltype=Fill)
+ string format=defaultformat, pen p=currentpen, filltype filltype=dotfilltype)
{
Label L=L.copy();
L.position(z);
@@ -345,7 +348,7 @@ void dot(picture pic=currentpicture, Label L, pair z, align align=NoAlign,
void dot(picture pic=currentpicture, Label[] L=new Label[], pair[] z,
align align=NoAlign, string format=defaultformat, pen p=currentpen,
- filltype filltype=Fill)
+ filltype filltype=dotfilltype)
{
int stop=min(L.length,z.length);
for(int i=0; i < stop; ++i)
@@ -356,7 +359,7 @@ void dot(picture pic=currentpicture, Label[] L=new Label[], pair[] z,
void dot(picture pic=currentpicture, Label[] L=new Label[],
explicit path g, align align=RightSide, string format=defaultformat,
- pen p=currentpen, filltype filltype=Fill)
+ pen p=currentpen, filltype filltype=dotfilltype)
{
int n=size(g);
int stop=min(L.length,n);
@@ -367,20 +370,20 @@ void dot(picture pic=currentpicture, Label[] L=new Label[],
}
void dot(picture pic=currentpicture, path[] g, pen p=currentpen,
- filltype filltype=Fill)
+ filltype filltype=dotfilltype)
{
for(int i=0; i < g.length; ++i)
dot(pic,g[i],p,filltype);
}
void dot(picture pic=currentpicture, Label L, pen p=currentpen,
- filltype filltype=Fill)
+ filltype filltype=dotfilltype)
{
dot(pic,L,L.position,p,filltype);
}
// A dot in a frame.
-frame dotframe(pen p=currentpen, filltype filltype=Fill)
+frame dotframe(pen p=currentpen, filltype filltype=dotfilltype)
{
frame f;
dot(f,(0,0),p,filltype);
@@ -389,7 +392,7 @@ frame dotframe(pen p=currentpen, filltype filltype=Fill)
frame dotframe=dotframe();
-marker dot(pen p=currentpen, filltype filltype=Fill)
+marker dot(pen p=currentpen, filltype filltype=dotfilltype)
{
return marker(dotframe(p,filltype));
}