Skip to content

Commit 3dd8ce2

Browse files
ACI0104407 (report 20.x)
1 parent 7e25f9c commit 3dd8ce2

File tree

2 files changed

+135
-122
lines changed

2 files changed

+135
-122
lines changed
Lines changed: 65 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,67 @@
1-
C_LONGINT:C283($i;$j;$x;$y;$width;$height;$svgWidth;$svgHeight)
2-
C_OBJECT:C1216($sel;$cells;$currentCell)
3-
C_TEXT:C284($path)
4-
C_TEXT:C284($color)
5-
C_TEXT:C284($svg;$svgRect)
6-
7-
$width:=20
8-
$height:=6
9-
10-
11-
$sel:=WP Selection range:C1340([SAMPLE:1]WP:2)
12-
$cells:=WP Table get cells:C1477($sel)
13-
If (Not:C34($cells=Null:C1517))
14-
15-
$svgWidth:=($width*$cells.columnCount)+2
16-
$svgHeight:=($height*$cells.rowCount)+1
17-
18-
If ($svgWidth<82)
19-
$svgWidth:=82
20-
End if
21-
If ($svgHeight<30)
22-
$svgHeight:=30
23-
End if
24-
25-
26-
SVG_SET_OPTIONS (SVG_Get_options ?+ 5)
27-
28-
$svg:=SVG_New ($svgWidth;$svgHeight) //;"";"") //;True)//;Scaled to fit prop centered)
29-
$x:=1
30-
$y:=1
31-
32-
For ($i;1;$cells.columnCount)
33-
34-
For ($j;1;$cells.rowCount)
35-
36-
$currentCell:=WP Table get cells:C1477($cells.table;$i;$j;1;1)
37-
WP GET ATTRIBUTES:C1345($currentCell;wk background color:K81:20;$color)
38-
39-
$svgRect:=SVG_New_rect ($svg;$x;$y;$width;$height;0;0;"black";$color;1)
40-
41-
42-
$y:=$y+$height
43-
End for
44-
$x:=$x+$width
45-
$y:=1
46-
47-
End for
48-
49-
SVG_SET_SHAPE_RENDERING ($svg;"crispEdges")
50-
51-
//SVGTool_SHOW_IN_VIEWER ($svg)
52-
53-
SVG EXPORT TO PICTURE:C1017($svg;vSVG)
54-
55-
$path:=Get 4D folder:C485(Current resources folder:K5:16)+"table_templates"
56-
$Path:=$path+Folder separator:K24:12+"TableTemplate_"+String:C10(templateID;"00")+".png"
57-
WRITE PICTURE FILE:C680($path;vSVG;".png")
58-
59-
End if
1+
// ACI0104407 no more dependencies with 4D SVG
2+
3+
// the whole method has been commented
4+
// (could be decommented for temporary use)
5+
6+
7+
//C_LONGINT($i; $j; $x; $y; $width; $height; $svgWidth; $svgHeight)
8+
//C_OBJECT($sel; $cells; $currentCell)
9+
//C_TEXT($path)
10+
//C_TEXT($color)
11+
//C_TEXT($svg; $svgRect)
12+
13+
//$width:=20
14+
//$height:=6
15+
16+
17+
//$sel:=WP Selection range([SAMPLE]WP)
18+
//$cells:=WP Table get cells($sel)
19+
//If (Not($cells=Null))
20+
21+
//$svgWidth:=($width*$cells.columnCount)+2
22+
//$svgHeight:=($height*$cells.rowCount)+1
23+
24+
//If ($svgWidth<82)
25+
//$svgWidth:=82
26+
//End if
27+
//If ($svgHeight<30)
28+
//$svgHeight:=30
29+
//End if
30+
31+
32+
//SVG_SET_OPTIONS(SVG_Get_options ?+ 5)
33+
34+
//$svg:=SVG_New($svgWidth; $svgHeight) //;"";"") //;True)//;Scaled to fit prop centered)
35+
//$x:=1
36+
//$y:=1
37+
38+
//For ($i; 1; $cells.columnCount)
39+
40+
//For ($j; 1; $cells.rowCount)
41+
42+
//$currentCell:=WP Table get cells($cells.table; $i; $j; 1; 1)
43+
//WP GET ATTRIBUTES($currentCell; wk background color; $color)
44+
45+
//$svgRect:=SVG_New_rect($svg; $x; $y; $width; $height; 0; 0; "black"; $color; 1)
46+
47+
48+
//$y:=$y+$height
49+
//End for
50+
//$x:=$x+$width
51+
//$y:=1
52+
53+
//End for
54+
55+
//SVG_SET_SHAPE_RENDERING($svg; "crispEdges")
56+
57+
////SVGTool_SHOW_IN_VIEWER ($svg)
58+
59+
//SVG EXPORT TO PICTURE($svg; vSVG)
60+
61+
//$path:=Get 4D folder(Current resources folder)+"table_templates"
62+
//$Path:=$path+Folder separator+"TableTemplate_"+String(templateID; "00")+".png"
63+
//WRITE PICTURE FILE($path; vSVG; ".png")
64+
65+
//End if
6066

6167

Lines changed: 70 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,72 @@
1-
C_LONGINT:C283($i;$j;$x;$y;$width;$height;$svgWidth;$svgHeight)
2-
C_OBJECT:C1216($sel;$cells;$currentCell)
3-
C_TEXT:C284($path)
4-
C_TEXT:C284($color)
5-
C_TEXT:C284($svg;$svgRect)
6-
7-
$width:=20
8-
$height:=6
9-
10-
11-
$sel:=WP Selection range:C1340([SAMPLE:1]WP:2)
12-
$cells:=WP Table get cells:C1477($sel)
13-
If (Not:C34($cells=Null:C1517))
14-
15-
$svgWidth:=($width*$cells.columnCount)+2
16-
$svgHeight:=($height*$cells.rowCount)+1
17-
18-
If ($svgWidth<82)
19-
$svgWidth:=82
20-
End if
21-
If ($svgHeight<30)
22-
$svgHeight:=30
23-
End if
24-
25-
26-
SVG_SET_OPTIONS (SVG_Get_options ?+ 5)
27-
28-
$svg:=SVG_New ($svgWidth;$svgHeight) //;"";"") //;True)//;Scaled to fit prop centered)
29-
$x:=1
30-
$y:=1
31-
32-
For ($i;1;$cells.columnCount)
33-
34-
For ($j;1;$cells.rowCount)
35-
36-
$currentCell:=WP Table get cells:C1477($cells.table;$i;$j;1;1)
37-
WP GET ATTRIBUTES:C1345($currentCell;wk background color:K81:20;$color)
38-
39-
If ($color="transparent")
40-
$color:="#FFFFFF"
41-
End if
42-
43-
$svgRect:=SVG_New_rect ($svg;$x;$y;$width;$height;0;0;"black";$color;1)
44-
45-
46-
$y:=$y+$height
47-
End for
48-
$x:=$x+$width
49-
$y:=1
50-
51-
End for
52-
53-
SVG_SET_SHAPE_RENDERING ($svg;"crispEdges")
54-
55-
//SVGTool_SHOW_IN_VIEWER ($svg)
56-
57-
SVG EXPORT TO PICTURE:C1017($svg;vSVG)
58-
59-
$path:=Get 4D folder:C485(Current resources folder:K5:16)+"table_templates"
60-
$Path:=$path+Folder separator:K24:12+"TableTemplate_"+String:C10(templateID;"00")+".png"
61-
WRITE PICTURE FILE:C680($path;vSVG;".png")
62-
63-
End if
1+
// ACI0104407 no more dependencies with 4D SVG
2+
3+
// the whole method has been commented
4+
// (could be decommented for temporary use)
5+
6+
7+
8+
//C_LONGINT($i; $j; $x; $y; $width; $height; $svgWidth; $svgHeight)
9+
//C_OBJECT($sel; $cells; $currentCell)
10+
//C_TEXT($path)
11+
//C_TEXT($color)
12+
//C_TEXT($svg; $svgRect)
13+
14+
//$width:=20
15+
//$height:=6
16+
17+
18+
//$sel:=WP Selection range([SAMPLE]WP)
19+
//$cells:=WP Table get cells($sel)
20+
//If (Not($cells=Null))
21+
22+
//$svgWidth:=($width*$cells.columnCount)+2
23+
//$svgHeight:=($height*$cells.rowCount)+1
24+
25+
//If ($svgWidth<82)
26+
//$svgWidth:=82
27+
//End if
28+
//If ($svgHeight<30)
29+
//$svgHeight:=30
30+
//End if
31+
32+
33+
//SVG_SET_OPTIONS(SVG_Get_options ?+ 5)
34+
35+
//$svg:=SVG_New($svgWidth; $svgHeight) //;"";"") //;True)//;Scaled to fit prop centered)
36+
//$x:=1
37+
//$y:=1
38+
39+
//For ($i; 1; $cells.columnCount)
40+
41+
//For ($j; 1; $cells.rowCount)
42+
43+
//$currentCell:=WP Table get cells($cells.table; $i; $j; 1; 1)
44+
//WP GET ATTRIBUTES($currentCell; wk background color; $color)
45+
46+
//If ($color="transparent")
47+
//$color:="#FFFFFF"
48+
//End if
49+
50+
//$svgRect:=SVG_New_rect($svg; $x; $y; $width; $height; 0; 0; "black"; $color; 1)
51+
52+
53+
//$y:=$y+$height
54+
//End for
55+
//$x:=$x+$width
56+
//$y:=1
57+
58+
//End for
59+
60+
//SVG_SET_SHAPE_RENDERING($svg; "crispEdges")
61+
62+
////SVGTool_SHOW_IN_VIEWER ($svg)
63+
64+
//SVG EXPORT TO PICTURE($svg; vSVG)
65+
66+
//$path:=Get 4D folder(Current resources folder)+"table_templates"
67+
//$Path:=$path+Folder separator+"TableTemplate_"+String(templateID; "00")+".png"
68+
//WRITE PICTURE FILE($path; vSVG; ".png")
69+
70+
//End if
6471

6572

0 commit comments

Comments
 (0)