| | @@ -2673,11 +2673,11 @@ |
| 2673 | 2673 | {p->cur->larrow=1; p->cur->rarrow=1; } |
| 2674 | 2674 | #line 2699 "pikchr.c" |
| 2675 | 2675 | break; |
| 2676 | 2676 | case 58: /* boolproperty ::= INVIS */ |
| 2677 | 2677 | #line 676 "pikchr.y" |
| 2678 | | -{p->cur->sw = 0.0;} |
| 2678 | +{p->cur->sw = -0.00001;} |
| 2679 | 2679 | #line 2704 "pikchr.c" |
| 2680 | 2680 | break; |
| 2681 | 2681 | case 59: /* boolproperty ::= THICK */ |
| 2682 | 2682 | #line 677 "pikchr.y" |
| 2683 | 2683 | {p->cur->sw *= 1.5;} |
| | @@ -3635,11 +3635,11 @@ |
| 3635 | 3635 | pik_bbox_add_xy(&pObj->bbox, m.x, m.y); |
| 3636 | 3636 | } |
| 3637 | 3637 | static void arcRender(Pik *p, PObj *pObj){ |
| 3638 | 3638 | PPoint f, m, t; |
| 3639 | 3639 | if( pObj->nPath<2 ) return; |
| 3640 | | - if( pObj->sw<=0.0 ) return; |
| 3640 | + if( pObj->sw<0.0 ) return; |
| 3641 | 3641 | f = pObj->aPath[0]; |
| 3642 | 3642 | t = pObj->aPath[1]; |
| 3643 | 3643 | m = arcControlPoint(pObj->cw,f,t,1.0); |
| 3644 | 3644 | if( pObj->larrow ){ |
| 3645 | 3645 | pik_draw_arrowhead(p,&m,&f,pObj); |
| | @@ -3748,11 +3748,11 @@ |
| 3748 | 3748 | static void boxRender(Pik *p, PObj *pObj){ |
| 3749 | 3749 | PNum w2 = 0.5*pObj->w; |
| 3750 | 3750 | PNum h2 = 0.5*pObj->h; |
| 3751 | 3751 | PNum rad = pObj->rad; |
| 3752 | 3752 | PPoint pt = pObj->ptAt; |
| 3753 | | - if( pObj->sw>0.0 ){ |
| 3753 | + if( pObj->sw>=0.0 ){ |
| 3754 | 3754 | if( rad<=0.0 ){ |
| 3755 | 3755 | pik_append_xy(p,"<path d=\"M", pt.x-w2,pt.y-h2); |
| 3756 | 3756 | pik_append_xy(p,"L", pt.x+w2,pt.y-h2); |
| 3757 | 3757 | pik_append_xy(p,"L", pt.x+w2,pt.y+h2); |
| 3758 | 3758 | pik_append_xy(p,"L", pt.x-w2,pt.y+h2); |
| | @@ -3850,11 +3850,11 @@ |
| 3850 | 3850 | } |
| 3851 | 3851 | |
| 3852 | 3852 | static void circleRender(Pik *p, PObj *pObj){ |
| 3853 | 3853 | PNum r = pObj->rad; |
| 3854 | 3854 | PPoint pt = pObj->ptAt; |
| 3855 | | - if( pObj->sw>0.0 ){ |
| 3855 | + if( pObj->sw>=0.0 ){ |
| 3856 | 3856 | pik_append_x(p,"<circle cx=\"", pt.x, "\""); |
| 3857 | 3857 | pik_append_y(p," cy=\"", pt.y, "\""); |
| 3858 | 3858 | pik_append_dis(p," r=\"", r, "\" "); |
| 3859 | 3859 | pik_append_style(p,pObj,3); |
| 3860 | 3860 | pik_append(p,"\" />\n", -1); |
| | @@ -3876,11 +3876,11 @@ |
| 3876 | 3876 | static void cylinderRender(Pik *p, PObj *pObj){ |
| 3877 | 3877 | PNum w2 = 0.5*pObj->w; |
| 3878 | 3878 | PNum h2 = 0.5*pObj->h; |
| 3879 | 3879 | PNum rad = pObj->rad; |
| 3880 | 3880 | PPoint pt = pObj->ptAt; |
| 3881 | | - if( pObj->sw>0.0 ){ |
| 3881 | + if( pObj->sw>=0.0 ){ |
| 3882 | 3882 | if( rad>h2 ){ |
| 3883 | 3883 | rad = h2; |
| 3884 | 3884 | }else if( rad<0 ){ |
| 3885 | 3885 | rad = 0; |
| 3886 | 3886 | } |
| | @@ -3947,11 +3947,11 @@ |
| 3947 | 3947 | return cZeroPoint; |
| 3948 | 3948 | } |
| 3949 | 3949 | static void dotRender(Pik *p, PObj *pObj){ |
| 3950 | 3950 | PNum r = pObj->rad; |
| 3951 | 3951 | PPoint pt = pObj->ptAt; |
| 3952 | | - if( pObj->sw>0.0 ){ |
| 3952 | + if( pObj->sw>=0.0 ){ |
| 3953 | 3953 | pik_append_x(p,"<circle cx=\"", pt.x, "\""); |
| 3954 | 3954 | pik_append_y(p," cy=\"", pt.y, "\""); |
| 3955 | 3955 | pik_append_dis(p," r=\"", r, "\""); |
| 3956 | 3956 | pik_append_style(p,pObj,2); |
| 3957 | 3957 | pik_append(p,"\" />\n", -1); |
| | @@ -4005,11 +4005,11 @@ |
| 4005 | 4005 | } |
| 4006 | 4006 | static void ellipseRender(Pik *p, PObj *pObj){ |
| 4007 | 4007 | PNum w = pObj->w; |
| 4008 | 4008 | PNum h = pObj->h; |
| 4009 | 4009 | PPoint pt = pObj->ptAt; |
| 4010 | | - if( pObj->sw>0.0 ){ |
| 4010 | + if( pObj->sw>=0.0 ){ |
| 4011 | 4011 | pik_append_x(p,"<ellipse cx=\"", pt.x, "\""); |
| 4012 | 4012 | pik_append_y(p," cy=\"", pt.y, "\""); |
| 4013 | 4013 | pik_append_dis(p," rx=\"", w/2.0, "\""); |
| 4014 | 4014 | pik_append_dis(p," ry=\"", h/2.0, "\" "); |
| 4015 | 4015 | pik_append_style(p,pObj,3); |
| | @@ -4062,11 +4062,11 @@ |
| 4062 | 4062 | PNum rad = pObj->rad; |
| 4063 | 4063 | PPoint pt = pObj->ptAt; |
| 4064 | 4064 | PNum mn = w2<h2 ? w2 : h2; |
| 4065 | 4065 | if( rad>mn ) rad = mn; |
| 4066 | 4066 | if( rad<mn*0.25 ) rad = mn*0.25; |
| 4067 | | - if( pObj->sw>0.0 ){ |
| 4067 | + if( pObj->sw>=0.0 ){ |
| 4068 | 4068 | pik_append_xy(p,"<path d=\"M", pt.x-w2,pt.y-h2); |
| 4069 | 4069 | pik_append_xy(p,"L", pt.x+w2,pt.y-h2); |
| 4070 | 4070 | pik_append_xy(p,"L", pt.x+w2,pt.y+(h2-rad)); |
| 4071 | 4071 | pik_append_xy(p,"L", pt.x+(w2-rad),pt.y+h2); |
| 4072 | 4072 | pik_append_xy(p,"L", pt.x-w2,pt.y+h2); |
| | @@ -4259,10 +4259,14 @@ |
| 4259 | 4259 | ** then get boxOffset() to do the offset computation. |
| 4260 | 4260 | */ |
| 4261 | 4261 | pik_size_to_fit(p, &pObj->errTok,3); |
| 4262 | 4262 | return boxOffset(p, pObj, cp); |
| 4263 | 4263 | } |
| 4264 | +static void textRender(Pik *p, PObj *pObj){ |
| 4265 | + pik_append_txt(p, pObj, 0); |
| 4266 | +} |
| 4267 | + |
| 4264 | 4268 | |
| 4265 | 4269 | /* Methods for the "sublist" class */ |
| 4266 | 4270 | static void sublistInit(Pik *p, PObj *pObj){ |
| 4267 | 4271 | PList *pList = pObj->pSublist; |
| 4268 | 4272 | int i; |
| | @@ -4423,11 +4427,11 @@ |
| 4423 | 4427 | /* xNumProp */ 0, |
| 4424 | 4428 | /* xCheck */ 0, |
| 4425 | 4429 | /* xChop */ boxChop, |
| 4426 | 4430 | /* xOffset */ textOffset, |
| 4427 | 4431 | /* xFit */ boxFit, |
| 4428 | | - /* xRender */ boxRender |
| 4432 | + /* xRender */ textRender |
| 4429 | 4433 | }, |
| 4430 | 4434 | }; |
| 4431 | 4435 | static const PClass sublistClass = |
| 4432 | 4436 | { /* name */ "[]", |
| 4433 | 4437 | /* isline */ 0, |
| | @@ -4778,11 +4782,11 @@ |
| 4778 | 4782 | } |
| 4779 | 4783 | pik_append_clr(p, "fill:", pObj->fill, ";", fillIsBg); |
| 4780 | 4784 | }else{ |
| 4781 | 4785 | pik_append(p,"fill:none;",-1); |
| 4782 | 4786 | } |
| 4783 | | - if( pObj->sw>0.0 && pObj->color>=0.0 ){ |
| 4787 | + if( pObj->sw>=0.0 && pObj->color>=0.0 ){ |
| 4784 | 4788 | PNum sw = pObj->sw; |
| 4785 | 4789 | pik_append_dis(p, "stroke-width:", sw, ";"); |
| 4786 | 4790 | if( pObj->nPath>2 && pObj->rad<=pObj->sw ){ |
| 4787 | 4791 | pik_append(p, "stroke-linejoin:round;", -1); |
| 4788 | 4792 | } |
| | @@ -7021,11 +7025,11 @@ |
| 7021 | 7025 | */ |
| 7022 | 7026 | static void pik_bbox_add_elist(Pik *p, PList *pList, PNum wArrow){ |
| 7023 | 7027 | int i; |
| 7024 | 7028 | for(i=0; i<pList->n; i++){ |
| 7025 | 7029 | PObj *pObj = pList->a[i]; |
| 7026 | | - if( pObj->sw>0.0 ) pik_bbox_addbox(&p->bbox, &pObj->bbox); |
| 7030 | + if( pObj->sw>=0.0 ) pik_bbox_addbox(&p->bbox, &pObj->bbox); |
| 7027 | 7031 | pik_append_txt(p, pObj, &p->bbox); |
| 7028 | 7032 | if( pObj->pSublist ) pik_bbox_add_elist(p, pObj->pSublist, wArrow); |
| 7029 | 7033 | |
| 7030 | 7034 | |
| 7031 | 7035 | /* Expand the bounding box to account for arrowheads on lines */ |
| | @@ -8138,6 +8142,6 @@ |
| 8138 | 8142 | |
| 8139 | 8143 | |
| 8140 | 8144 | #endif /* PIKCHR_TCL */ |
| 8141 | 8145 | |
| 8142 | 8146 | |
| 8143 | | -#line 8168 "pikchr.c" |
| 8147 | +#line 8172 "pikchr.c" |
| 8144 | 8148 | |