Commit 94e5fc25 authored by Emden R. Gansner's avatar Emden R. Gansner

Fix missing LEFT_RIGHT case in drawing cell borders;

add regression test for borders
parent 131a47b8
......@@ -314,6 +314,8 @@ static void doBorder(GVJ_t * job, htmldata_t * dp, boxf b)
break;
case BORDER_LEFT|BORDER_RIGHT :
AF[0] = AF[4];
gvrender_polyline(job, AF, 2);
gvrender_polyline(job, AF+2, 2);
break;
}
} else {
......
graph {
abc [shape=none, label = <<TABLE CELLSPACING="10">
<TR><TD SIDES="B">bottom</TD></TR>
<TR><TD SIDES="R">right</TD></TR>
<TR><TD SIDES="T">top</TD></TR>
<TR><TD SIDES="L">left</TD></TR>
<TR><TD SIDES="BR">bottomright</TD></TR>
<TR><TD SIDES="RT">righttop</TD></TR>
<TR><TD SIDES="TL">topleft</TD></TR>
<TR><TD SIDES="LB">leftbottom</TD></TR>
<TR><TD SIDES="BRT">bottomrighttop</TD></TR>
<TR><TD SIDES="RTL">righttopleft</TD></TR>
<TR><TD SIDES="TLB">topleftbottom</TD></TR>
<TR><TD SIDES="LBR">leftbottomright</TD></TR>
<TR><TD SIDES="TB">topbottom</TD></TR>
<TR><TD SIDES="LR">leftright</TD></TR>
</TABLE>> ]
}
%!PS-Adobe-3.0
%%Creator: graphviz version 2.39.0 (20141024.1718)
%%Title: %3
%%Pages: (atend)
%%BoundingBox: (atend)
%%EndComments
save
%%BeginProlog
/DotDict 200 dict def
DotDict begin
/setupLatin1 {
mark
/EncodingVector 256 array def
EncodingVector 0
ISOLatin1Encoding 0 255 getinterval putinterval
EncodingVector 45 /hyphen put
% Set up ISO Latin 1 character encoding
/starnetISO {
dup dup findfont dup length dict begin
{ 1 index /FID ne { def }{ pop pop } ifelse
} forall
/Encoding EncodingVector def
currentdict end definefont
} def
/Times-Roman starnetISO def
/Times-Italic starnetISO def
/Times-Bold starnetISO def
/Times-BoldItalic starnetISO def
/Helvetica starnetISO def
/Helvetica-Oblique starnetISO def
/Helvetica-Bold starnetISO def
/Helvetica-BoldOblique starnetISO def
/Courier starnetISO def
/Courier-Oblique starnetISO def
/Courier-Bold starnetISO def
/Courier-BoldOblique starnetISO def
cleartomark
} bind def
%%BeginResource: procset graphviz 0 0
/coord-font-family /Times-Roman def
/default-font-family /Times-Roman def
/coordfont coord-font-family findfont 8 scalefont def
/InvScaleFactor 1.0 def
/set_scale {
dup 1 exch div /InvScaleFactor exch def
scale
} bind def
% styles
/solid { [] 0 setdash } bind def
/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
/bold { 2 setlinewidth } bind def
/filled { } bind def
/unfilled { } bind def
/rounded { } bind def
/diagonals { } bind def
/tapered { } bind def
% hooks for setting color
/nodecolor { sethsbcolor } bind def
/edgecolor { sethsbcolor } bind def
/graphcolor { sethsbcolor } bind def
/nopcolor {pop pop pop} bind def
/beginpage { % i j npages
/npages exch def
/j exch def
/i exch def
/str 10 string def
npages 1 gt {
gsave
coordfont setfont
0 0 moveto
(\() show i str cvs show (,) show j str cvs show (\)) show
grestore
} if
} bind def
/set_font {
findfont exch
scalefont setfont
} def
% draw text fitted to its expected width
/alignedtext { % width text
/text exch def
/width exch def
gsave
width 0 gt {
[] 0 setdash
text stringwidth pop width exch sub text length div 0 text ashow
} if
grestore
} def
/boxprim { % xcorner ycorner xsize ysize
4 2 roll
moveto
2 copy
exch 0 rlineto
0 exch rlineto
pop neg 0 rlineto
closepath
} bind def
/ellipse_path {
/ry exch def
/rx exch def
/y exch def
/x exch def
matrix currentmatrix
newpath
x y translate
rx ry scale
0 0 1 0 360 arc
setmatrix
} bind def
/endpage { showpage } bind def
/showpage { } def
/layercolorseq
[ % layer color sequence - darkest to lightest
[0 0 0]
[.2 .8 .8]
[.4 .8 .8]
[.6 .8 .8]
[.8 .8 .8]
]
def
/layerlen layercolorseq length def
/setlayer {/maxlayer exch def /curlayer exch def
layercolorseq curlayer 1 sub layerlen mod get
aload pop sethsbcolor
/nodecolor {nopcolor} def
/edgecolor {nopcolor} def
/graphcolor {nopcolor} def
} bind def
/onlayer { curlayer ne {invis} if } def
/onlayers {
/myupper exch def
/mylower exch def
curlayer mylower lt
curlayer myupper gt
or
{invis} if
} def
/curlayer 0 def
%%EndResource
%%EndProlog
%%BeginSetup
14 default-font-family set_font
% /arrowlength 10 def
% /arrowwidth 5 def
% make sure pdfmark is harmless for PS-interpreters other than Distiller
/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
% make '<<' and '>>' safe on PS Level 1 devices
/languagelevel where {pop languagelevel}{1} ifelse
2 lt {
userdict (<<) cvn ([) cvn load put
userdict (>>) cvn ([) cvn load put
} if
%%EndSetup
setupLatin1
%%Page: 1 1
%%PageBoundingBox: 36 36 173 498
%%PageOrientation: Portrait
0 0 1 beginpage
gsave
36 36 137 462 boxprim clip newpath
1 1 set_scale 0 rotate 40 40 translate
% abc
gsave
1 setlinewidth
solid
0 0 0 nodecolor
newpath 19.5 418 moveto
110.5 418 lineto
stroke
0 0 0 nodecolor
14 /Times-Roman set_font
45 424.8 moveto 40 (bottom) alignedtext
1 setlinewidth
solid
0 0 0 nodecolor
newpath 110.5 387 moveto
110.5 408 lineto
stroke
0 0 0 nodecolor
14 /Times-Roman set_font
51.5 393.8 moveto 27 (right) alignedtext
1 setlinewidth
solid
0 0 0 nodecolor
newpath 110.5 377 moveto
19.5 377 lineto
stroke
0 0 0 nodecolor
14 /Times-Roman set_font
56 362.8 moveto 18 (top) alignedtext
1 setlinewidth
solid
0 0 0 nodecolor
newpath 19.5 346 moveto
19.5 325 lineto
stroke
0 0 0 nodecolor
14 /Times-Roman set_font
55.5 331.8 moveto 19 (left) alignedtext
1 setlinewidth
solid
0 0 0 nodecolor
newpath 19.5 294 moveto
110.5 294 lineto
110.5 315 lineto
stroke
0 0 0 nodecolor
14 /Times-Roman set_font
31.5 300.8 moveto 67 (bottomright) alignedtext
1 setlinewidth
solid
0 0 0 nodecolor
newpath 110.5 263 moveto
110.5 284 lineto
19.5 284 lineto
stroke
0 0 0 nodecolor
14 /Times-Roman set_font
42.5 269.8 moveto 45 (righttop) alignedtext
1 setlinewidth
solid
0 0 0 nodecolor
newpath 110.5 253 moveto
19.5 253 lineto
19.5 232 lineto
stroke
0 0 0 nodecolor
14 /Times-Roman set_font
46.5 238.8 moveto 37 (topleft) alignedtext
1 setlinewidth
solid
0 0 0 nodecolor
newpath 19.5 222 moveto
19.5 201 lineto
110.5 201 lineto
stroke
0 0 0 nodecolor
14 /Times-Roman set_font
35.5 207.8 moveto 59 (leftbottom) alignedtext
1 setlinewidth
solid
0 0 0 nodecolor
newpath 19.5 170 moveto
110.5 170 lineto
110.5 191 lineto
19.5 191 lineto
stroke
0 0 0 nodecolor
14 /Times-Roman set_font
22.5 176.8 moveto 85 (bottomrighttop) alignedtext
1 setlinewidth
solid
0 0 0 nodecolor
newpath 110.5 139 moveto
110.5 160 lineto
19.5 160 lineto
19.5 139 lineto
stroke
0 0 0 nodecolor
14 /Times-Roman set_font
33.5 145.8 moveto 63 (righttopleft) alignedtext
1 setlinewidth
solid
0 0 0 nodecolor
newpath 110.5 129 moveto
19.5 129 lineto
19.5 108 lineto
110.5 108 lineto
stroke
0 0 0 nodecolor
14 /Times-Roman set_font
26.5 114.8 moveto 77 (topleftbottom) alignedtext
1 setlinewidth
solid
0 0 0 nodecolor
newpath 19.5 98 moveto
19.5 77 lineto
110.5 77 lineto
110.5 98 lineto
stroke
0 0 0 nodecolor
14 /Times-Roman set_font
22.5 83.8 moveto 85 (leftbottomright) alignedtext
1 setlinewidth
solid
0 0 0 nodecolor
newpath 19.5 46 moveto
110.5 46 lineto
stroke
1 setlinewidth
solid
0 0 0 nodecolor
newpath 110.5 67 moveto
19.5 67 lineto
stroke
0 0 0 nodecolor
14 /Times-Roman set_font
36 52.8 moveto 58 (topbottom) alignedtext
1 setlinewidth
solid
0 0 0 nodecolor
newpath 19.5 36 moveto
19.5 15 lineto
stroke
1 setlinewidth
solid
0 0 0 nodecolor
newpath 110.5 15 moveto
110.5 36 lineto
stroke
0 0 0 nodecolor
14 /Times-Roman set_font
42 21.8 moveto 46 (leftright) alignedtext
1 setlinewidth
solid
0 0 0 nodecolor
newpath 8 4 moveto
8 450 lineto
121 450 lineto
121 4 lineto
closepath stroke
grestore
endpage
showpage
grestore
%%PageTrailer
%%EndPage: 1
%%Trailer
%%Pages: 1
%%BoundingBox: 36 36 173 498
end
restore
%%EOF
......@@ -344,3 +344,8 @@ xlabels
=
dot png
neato png
sides
=
dot ps
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment