Fossil SCM

Update to the latest pikchr with a fix for rendering of cylinders with oversize radii.

drh 2021-01-31 15:27 trunk
Commit 70964869af78b2af5917cf8389d8d7ce83cbae3527f0505d505d85579b5cce55
1 file changed +7 -2
+7 -2
--- src/pikchr.c
+++ src/pikchr.c
@@ -3842,10 +3842,15 @@
38423842
PNum w2 = 0.5*pObj->w;
38433843
PNum h2 = 0.5*pObj->h;
38443844
PNum rad = pObj->rad;
38453845
PPoint pt = pObj->ptAt;
38463846
if( pObj->sw>0.0 ){
3847
+ if( rad>h2 ){
3848
+ rad = h2;
3849
+ }else if( rad<0 ){
3850
+ rad = 0;
3851
+ }
38473852
pik_append_xy(p,"<path d=\"M", pt.x-w2,pt.y+h2-rad);
38483853
pik_append_xy(p,"L", pt.x-w2,pt.y-h2+rad);
38493854
pik_append_arc(p,w2,rad,pt.x+w2,pt.y-h2+rad);
38503855
pik_append_xy(p,"L", pt.x+w2,pt.y+h2-rad);
38513856
pik_append_arc(p,w2,rad,pt.x-w2,pt.y+h2-rad);
@@ -7752,11 +7757,11 @@
77527757
if( n<=0 ){
77537758
break;
77547759
}
77557760
nUsed += n;
77567761
}
7757
- if( in!=stderr ) fclose(in);
7762
+ if( in!=stdin ) fclose(in);
77587763
z[nUsed] = 0;
77597764
return z;
77607765
}
77617766
77627767
@@ -7924,6 +7929,6 @@
79247929
79257930
79267931
#endif /* PIKCHR_TCL */
79277932
79287933
7929
-#line 7954 "pikchr.c"
7934
+#line 7959 "pikchr.c"
79307935
--- src/pikchr.c
+++ src/pikchr.c
@@ -3842,10 +3842,15 @@
3842 PNum w2 = 0.5*pObj->w;
3843 PNum h2 = 0.5*pObj->h;
3844 PNum rad = pObj->rad;
3845 PPoint pt = pObj->ptAt;
3846 if( pObj->sw>0.0 ){
 
 
 
 
 
3847 pik_append_xy(p,"<path d=\"M", pt.x-w2,pt.y+h2-rad);
3848 pik_append_xy(p,"L", pt.x-w2,pt.y-h2+rad);
3849 pik_append_arc(p,w2,rad,pt.x+w2,pt.y-h2+rad);
3850 pik_append_xy(p,"L", pt.x+w2,pt.y+h2-rad);
3851 pik_append_arc(p,w2,rad,pt.x-w2,pt.y+h2-rad);
@@ -7752,11 +7757,11 @@
7752 if( n<=0 ){
7753 break;
7754 }
7755 nUsed += n;
7756 }
7757 if( in!=stderr ) fclose(in);
7758 z[nUsed] = 0;
7759 return z;
7760 }
7761
7762
@@ -7924,6 +7929,6 @@
7924
7925
7926 #endif /* PIKCHR_TCL */
7927
7928
7929 #line 7954 "pikchr.c"
7930
--- src/pikchr.c
+++ src/pikchr.c
@@ -3842,10 +3842,15 @@
3842 PNum w2 = 0.5*pObj->w;
3843 PNum h2 = 0.5*pObj->h;
3844 PNum rad = pObj->rad;
3845 PPoint pt = pObj->ptAt;
3846 if( pObj->sw>0.0 ){
3847 if( rad>h2 ){
3848 rad = h2;
3849 }else if( rad<0 ){
3850 rad = 0;
3851 }
3852 pik_append_xy(p,"<path d=\"M", pt.x-w2,pt.y+h2-rad);
3853 pik_append_xy(p,"L", pt.x-w2,pt.y-h2+rad);
3854 pik_append_arc(p,w2,rad,pt.x+w2,pt.y-h2+rad);
3855 pik_append_xy(p,"L", pt.x+w2,pt.y+h2-rad);
3856 pik_append_arc(p,w2,rad,pt.x-w2,pt.y+h2-rad);
@@ -7752,11 +7757,11 @@
7757 if( n<=0 ){
7758 break;
7759 }
7760 nUsed += n;
7761 }
7762 if( in!=stdin ) fclose(in);
7763 z[nUsed] = 0;
7764 return z;
7765 }
7766
7767
@@ -7924,6 +7929,6 @@
7929
7930
7931 #endif /* PIKCHR_TCL */
7932
7933
7934 #line 7959 "pikchr.c"
7935

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button