thinreports 0.10.2 → 0.12.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/CONTRIBUTING.md +2 -2
- data/.github/dependabot.yml +11 -0
- data/.github/workflows/test.yml +50 -0
- data/.gitignore +1 -0
- data/CHANGELOG.md +43 -0
- data/Gemfile +2 -1
- data/{MIT-LICENSE → LICENSE.txt} +2 -0
- data/README.md +70 -56
- data/Rakefile +12 -25
- data/gemfiles/prawn-2.2.gemfile +5 -0
- data/gemfiles/prawn-2.3.gemfile +5 -0
- data/gemfiles/prawn-2.4.gemfile +5 -0
- data/lib/thinreports/core/shape/basic/format.rb +5 -0
- data/lib/thinreports/core/shape/image_block.rb +1 -1
- data/lib/thinreports/core/shape/list.rb +1 -1
- data/lib/thinreports/core/shape/page_number.rb +1 -1
- data/lib/thinreports/core/shape/stack_view/format.rb +27 -0
- data/lib/thinreports/core/shape/stack_view/interface.rb +17 -0
- data/lib/thinreports/core/shape/stack_view/internal.rb +22 -0
- data/lib/thinreports/core/shape/stack_view/row_format.rb +39 -0
- data/lib/thinreports/core/shape/stack_view.rb +17 -0
- data/lib/thinreports/core/shape/style/basic.rb +4 -1
- data/lib/thinreports/core/shape/text.rb +1 -1
- data/lib/thinreports/core/shape/text_block/formatter/number.rb +6 -1
- data/lib/thinreports/core/shape/text_block/internal.rb +0 -2
- data/lib/thinreports/core/shape/text_block.rb +1 -1
- data/lib/thinreports/core/shape.rb +2 -0
- data/lib/thinreports/generate.rb +11 -0
- data/lib/thinreports/generator/pdf/document/draw_shape.rb +31 -10
- data/lib/thinreports/generator/pdf/document/draw_template_items.rb +1 -1
- data/lib/thinreports/generator/pdf/document/graphics/image.rb +19 -1
- data/lib/thinreports/generator/pdf/document/graphics/text.rb +10 -5
- data/lib/thinreports/generator/pdf/document/page.rb +12 -0
- data/lib/thinreports/generator/pdf/prawn_ext/width_of.rb +7 -7
- data/lib/thinreports/layout/base.rb +1 -1
- data/lib/thinreports/layout/legacy_schema.rb +1 -0
- data/lib/thinreports/layout/version.rb +1 -1
- data/lib/thinreports/report/internal.rb +2 -0
- data/lib/thinreports/report.rb +2 -2
- data/lib/thinreports/section_report/build.rb +32 -0
- data/lib/thinreports/section_report/builder/item_builder.rb +49 -0
- data/lib/thinreports/section_report/builder/report_builder.rb +82 -0
- data/lib/thinreports/section_report/builder/report_data.rb +13 -0
- data/lib/thinreports/section_report/builder/stack_view_builder.rb +53 -0
- data/lib/thinreports/section_report/builder/stack_view_data.rb +11 -0
- data/lib/thinreports/section_report/generate.rb +26 -0
- data/lib/thinreports/section_report/pdf/render.rb +23 -0
- data/lib/thinreports/section_report/pdf/renderer/draw_item.rb +68 -0
- data/lib/thinreports/section_report/pdf/renderer/group_renderer.rb +57 -0
- data/lib/thinreports/section_report/pdf/renderer/section_height.rb +100 -0
- data/lib/thinreports/section_report/pdf/renderer/section_renderer.rb +39 -0
- data/lib/thinreports/section_report/pdf/renderer/stack_view_renderer.rb +55 -0
- data/lib/thinreports/section_report/pdf/renderer/stack_view_row_renderer.rb +38 -0
- data/lib/thinreports/section_report/schema/loader.rb +28 -0
- data/lib/thinreports/section_report/schema/parser.rb +52 -0
- data/lib/thinreports/section_report/schema/report.rb +30 -0
- data/lib/thinreports/section_report/schema/section.rb +47 -0
- data/lib/thinreports/version.rb +1 -1
- data/lib/thinreports.rb +5 -0
- data/thinreports.gemspec +11 -10
- metadata +48 -150
- data/.travis.yml +0 -16
- data/examples/character_spacing/character_spacing.rb +0 -8
- data/examples/character_spacing/character_spacing.tlf +0 -293
- data/examples/dynamic_image/dynamic_image.rb +0 -31
- data/examples/dynamic_image/dynamic_image.tlf +0 -661
- data/examples/dynamic_image/img200x100.png +0 -0
- data/examples/dynamic_image/img50x50.png +0 -0
- data/examples/dynamic_style/dynamic_style.rb +0 -150
- data/examples/dynamic_style/dynamic_style.tlf +0 -1835
- data/examples/dynamic_style/dynamic_style_in_list.tlf +0 -344
- data/examples/dynamic_style/image.png +0 -0
- data/examples/eudc/eudc.rb +0 -20
- data/examples/eudc/eudc.tlf +0 -180
- data/examples/eudc/eudc.ttf +0 -0
- data/examples/helper.rb +0 -50
- data/examples/hidden_shapes/hidden_shapes.rb +0 -9
- data/examples/hidden_shapes/hidden_shapes.tlf +0 -449
- data/examples/list_events/list_events.rb +0 -32
- data/examples/list_events/list_events.tlf +0 -361
- data/examples/list_manual_generation/list_manual_generation.rb +0 -22
- data/examples/list_manual_generation/list_manual_generation.tlf +0 -132
- data/examples/list_page_number/list_page_number.rb +0 -17
- data/examples/list_page_number/list_page_number.tlf +0 -254
- data/examples/page_number/page_number.rb +0 -33
- data/examples/page_number/page_number.tlf +0 -215
- data/examples/palleted_png/palleted_png.png +0 -0
- data/examples/palleted_png/palleted_png.rb +0 -9
- data/examples/palleted_png/palleted_png.tlf +0 -47
- data/examples/password_setting/password_setting.rb +0 -10
- data/examples/password_setting/password_setting.tlf +0 -45
- data/examples/report_callbacks/report_callbacks.rb +0 -14
- data/examples/report_callbacks/report_callbacks.tlf +0 -147
- data/examples/single_line_tblock/single_line_tblock.rb +0 -13
- data/examples/single_line_tblock/single_line_tblock.tlf +0 -170
- data/examples/tblock_overflow/tblock_overflow.rb +0 -20
- data/examples/tblock_overflow/tblock_overflow.tlf +0 -538
- data/examples/tblock_styles/font_size.tlf +0 -383
- data/examples/tblock_styles/tblock_styles.rb +0 -43
- data/examples/tblock_styles/tblock_styles.tlf +0 -889
- data/examples/text_align/text_align.rb +0 -8
- data/examples/text_align/text_align.tlf +0 -241
- data/examples/typeB_page_size/B4_ISO.tlf +0 -45
- data/examples/typeB_page_size/B4_JIS.tlf +0 -45
- data/examples/typeB_page_size/typeB_page_size.rb +0 -17
- data/examples/word_wrap/word_wrap.rb +0 -26
- data/examples/word_wrap/word_wrap.tlf +0 -297
- data/test/data/font.ttf +0 -0
- data/test/data/image_normal.jpg +0 -0
- data/test/data/image_normal.png +0 -0
- data/test/data/image_normal_jpg_noext +0 -0
- data/test/data/image_normal_png_noext +0 -0
- data/test/data/image_pallete_based.png +0 -0
- data/test/data/legacy_layout/all-items.tlf +0 -1
- data/test/schema_helper.rb +0 -122
- data/test/test_helper.rb +0 -48
- data/test/tmp/.gitkeep +0 -0
- data/test/unit/core/format/test_base.rb +0 -152
- data/test/unit/core/shape/base/test_internal.rb +0 -87
- data/test/unit/core/shape/basic/test_block_format.rb +0 -23
- data/test/unit/core/shape/basic/test_block_interface.rb +0 -29
- data/test/unit/core/shape/basic/test_block_internal.rb +0 -55
- data/test/unit/core/shape/basic/test_format.rb +0 -37
- data/test/unit/core/shape/basic/test_interface.rb +0 -108
- data/test/unit/core/shape/basic/test_internal.rb +0 -55
- data/test/unit/core/shape/image_block/test_interface.rb +0 -24
- data/test/unit/core/shape/image_block/test_internal.rb +0 -31
- data/test/unit/core/shape/list/test_format.rb +0 -111
- data/test/unit/core/shape/list/test_manager.rb +0 -67
- data/test/unit/core/shape/list/test_page.rb +0 -156
- data/test/unit/core/shape/list/test_page_state.rb +0 -31
- data/test/unit/core/shape/list/test_section_format.rb +0 -36
- data/test/unit/core/shape/list/test_section_interface.rb +0 -75
- data/test/unit/core/shape/list/test_section_internal.rb +0 -50
- data/test/unit/core/shape/manager/test_format.rb +0 -38
- data/test/unit/core/shape/manager/test_internal.rb +0 -132
- data/test/unit/core/shape/manager/test_target.rb +0 -140
- data/test/unit/core/shape/page_number/test_format.rb +0 -55
- data/test/unit/core/shape/page_number/test_interface.rb +0 -33
- data/test/unit/core/shape/page_number/test_internal.rb +0 -81
- data/test/unit/core/shape/styles/test_base.rb +0 -191
- data/test/unit/core/shape/styles/test_basic.rb +0 -24
- data/test/unit/core/shape/styles/test_graphic.rb +0 -50
- data/test/unit/core/shape/styles/test_text.rb +0 -97
- data/test/unit/core/shape/text/test_format.rb +0 -44
- data/test/unit/core/shape/text/test_internal.rb +0 -20
- data/test/unit/core/shape/text_block/formatter/test_basic.rb +0 -24
- data/test/unit/core/shape/text_block/formatter/test_datetime.rb +0 -49
- data/test/unit/core/shape/text_block/formatter/test_number.rb +0 -76
- data/test/unit/core/shape/text_block/formatter/test_padding.rb +0 -77
- data/test/unit/core/shape/text_block/test_format.rb +0 -169
- data/test/unit/core/shape/text_block/test_formatter.rb +0 -28
- data/test/unit/core/shape/text_block/test_interface.rb +0 -63
- data/test/unit/core/shape/text_block/test_internal.rb +0 -128
- data/test/unit/core/test_shape.rb +0 -52
- data/test/unit/core/test_utils.rb +0 -68
- data/test/unit/generator/pdf/document/graphics/test_attributes.rb +0 -135
- data/test/unit/generator/pdf/document/graphics/test_basic.rb +0 -46
- data/test/unit/generator/pdf/document/graphics/test_image.rb +0 -46
- data/test/unit/generator/pdf/document/graphics/test_text.rb +0 -171
- data/test/unit/generator/pdf/document/test_font.rb +0 -110
- data/test/unit/generator/pdf/document/test_graphics.rb +0 -42
- data/test/unit/generator/pdf/document/test_page.rb +0 -122
- data/test/unit/generator/pdf/document/test_parse_color.rb +0 -30
- data/test/unit/generator/pdf/prawn_ext/test_calc_image_dimensions.rb +0 -41
- data/test/unit/generator/pdf/prawn_ext/test_width_of.rb +0 -22
- data/test/unit/generator/pdf/test_document.rb +0 -22
- data/test/unit/generator/test_pdf.rb +0 -26
- data/test/unit/layout/test_base.rb +0 -41
- data/test/unit/layout/test_format.rb +0 -100
- data/test/unit/layout/test_legacy_schema.rb +0 -574
- data/test/unit/layout/test_version.rb +0 -26
- data/test/unit/report/test_base.rb +0 -248
- data/test/unit/report/test_internal.rb +0 -206
- data/test/unit/test_config.rb +0 -36
- data/test/unit/test_layout.rb +0 -12
- data/test/unit/test_report.rb +0 -18
@@ -1,383 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"version": "0.9.0",
|
3
|
-
"items": [
|
4
|
-
{
|
5
|
-
"id": "",
|
6
|
-
"type": "text",
|
7
|
-
"display": true,
|
8
|
-
"description": "",
|
9
|
-
"x": 40,
|
10
|
-
"y": 60,
|
11
|
-
"width": 151.8,
|
12
|
-
"height": 46,
|
13
|
-
"style": {
|
14
|
-
"font-family": [
|
15
|
-
"Helvetica"
|
16
|
-
],
|
17
|
-
"font-size": 18,
|
18
|
-
"color": "#000000",
|
19
|
-
"text-align": "left",
|
20
|
-
"vertical-align": "top",
|
21
|
-
"line-height": "",
|
22
|
-
"line-height-ratio": "",
|
23
|
-
"letter-spacing": "",
|
24
|
-
"font-style": []
|
25
|
-
},
|
26
|
-
"texts": [
|
27
|
-
"サイズ18"
|
28
|
-
]
|
29
|
-
},
|
30
|
-
{
|
31
|
-
"id": "text_single24",
|
32
|
-
"type": "text",
|
33
|
-
"display": true,
|
34
|
-
"description": "",
|
35
|
-
"x": 165,
|
36
|
-
"y": 60,
|
37
|
-
"width": 151.8,
|
38
|
-
"height": 46,
|
39
|
-
"style": {
|
40
|
-
"font-family": [
|
41
|
-
"Helvetica"
|
42
|
-
],
|
43
|
-
"font-size": 18,
|
44
|
-
"color": "#000000",
|
45
|
-
"text-align": "left",
|
46
|
-
"vertical-align": "top",
|
47
|
-
"line-height": "",
|
48
|
-
"line-height-ratio": "",
|
49
|
-
"letter-spacing": "",
|
50
|
-
"font-style": []
|
51
|
-
},
|
52
|
-
"texts": [
|
53
|
-
"サイズ24"
|
54
|
-
]
|
55
|
-
},
|
56
|
-
{
|
57
|
-
"id": "text_single32",
|
58
|
-
"type": "text",
|
59
|
-
"display": true,
|
60
|
-
"description": "",
|
61
|
-
"x": 345,
|
62
|
-
"y": 60,
|
63
|
-
"width": 151.8,
|
64
|
-
"height": 46,
|
65
|
-
"style": {
|
66
|
-
"font-family": [
|
67
|
-
"Helvetica"
|
68
|
-
],
|
69
|
-
"font-size": 18,
|
70
|
-
"color": "#000000",
|
71
|
-
"text-align": "left",
|
72
|
-
"vertical-align": "top",
|
73
|
-
"line-height": "",
|
74
|
-
"line-height-ratio": "",
|
75
|
-
"letter-spacing": "",
|
76
|
-
"font-style": []
|
77
|
-
},
|
78
|
-
"texts": [
|
79
|
-
"サイズ32"
|
80
|
-
]
|
81
|
-
},
|
82
|
-
{
|
83
|
-
"id": "",
|
84
|
-
"type": "text",
|
85
|
-
"display": true,
|
86
|
-
"description": "",
|
87
|
-
"x": 35,
|
88
|
-
"y": 179.8,
|
89
|
-
"width": 200,
|
90
|
-
"height": 100,
|
91
|
-
"style": {
|
92
|
-
"font-family": [
|
93
|
-
"Helvetica"
|
94
|
-
],
|
95
|
-
"font-size": 18,
|
96
|
-
"color": "#000000",
|
97
|
-
"text-align": "left",
|
98
|
-
"vertical-align": "top",
|
99
|
-
"line-height": "",
|
100
|
-
"line-height-ratio": "",
|
101
|
-
"letter-spacing": "",
|
102
|
-
"font-style": []
|
103
|
-
},
|
104
|
-
"texts": [
|
105
|
-
"サイズ18",
|
106
|
-
"サイズ18"
|
107
|
-
]
|
108
|
-
},
|
109
|
-
{
|
110
|
-
"id": "text_multiple24",
|
111
|
-
"type": "text",
|
112
|
-
"display": true,
|
113
|
-
"description": "",
|
114
|
-
"x": 165,
|
115
|
-
"y": 179.8,
|
116
|
-
"width": 200,
|
117
|
-
"height": 100,
|
118
|
-
"style": {
|
119
|
-
"font-family": [
|
120
|
-
"Helvetica"
|
121
|
-
],
|
122
|
-
"font-size": 18,
|
123
|
-
"color": "#000000",
|
124
|
-
"text-align": "left",
|
125
|
-
"vertical-align": "top",
|
126
|
-
"line-height": "",
|
127
|
-
"line-height-ratio": "",
|
128
|
-
"letter-spacing": "",
|
129
|
-
"font-style": []
|
130
|
-
},
|
131
|
-
"texts": [
|
132
|
-
"サイズ24",
|
133
|
-
"サイズ24"
|
134
|
-
]
|
135
|
-
},
|
136
|
-
{
|
137
|
-
"id": "text_multiple32",
|
138
|
-
"type": "text",
|
139
|
-
"display": true,
|
140
|
-
"description": "",
|
141
|
-
"x": 345,
|
142
|
-
"y": 179.8,
|
143
|
-
"width": 200,
|
144
|
-
"height": 100,
|
145
|
-
"style": {
|
146
|
-
"font-family": [
|
147
|
-
"Helvetica"
|
148
|
-
],
|
149
|
-
"font-size": 18,
|
150
|
-
"color": "#000000",
|
151
|
-
"text-align": "left",
|
152
|
-
"vertical-align": "top",
|
153
|
-
"line-height": "",
|
154
|
-
"line-height-ratio": "",
|
155
|
-
"letter-spacing": "",
|
156
|
-
"font-style": []
|
157
|
-
},
|
158
|
-
"texts": [
|
159
|
-
"サイズ32",
|
160
|
-
"サイズ32"
|
161
|
-
]
|
162
|
-
},
|
163
|
-
{
|
164
|
-
"id": "block_single18",
|
165
|
-
"type": "text-block",
|
166
|
-
"display": true,
|
167
|
-
"description": "",
|
168
|
-
"x": 40,
|
169
|
-
"y": 320.6,
|
170
|
-
"width": 103.4,
|
171
|
-
"height": 17,
|
172
|
-
"style": {
|
173
|
-
"font-family": [
|
174
|
-
"Helvetica"
|
175
|
-
],
|
176
|
-
"font-size": 18,
|
177
|
-
"color": "#000000",
|
178
|
-
"text-align": "left",
|
179
|
-
"vertical-align": "top",
|
180
|
-
"line-height": "",
|
181
|
-
"line-height-ratio": "",
|
182
|
-
"letter-spacing": "",
|
183
|
-
"font-style": [],
|
184
|
-
"overflow": "truncate",
|
185
|
-
"word-wrap": "break-word"
|
186
|
-
},
|
187
|
-
"reference-id": "",
|
188
|
-
"value": "",
|
189
|
-
"multiple-line": false,
|
190
|
-
"format": {
|
191
|
-
"base": "",
|
192
|
-
"type": ""
|
193
|
-
}
|
194
|
-
},
|
195
|
-
{
|
196
|
-
"id": "block_single24",
|
197
|
-
"type": "text-block",
|
198
|
-
"display": true,
|
199
|
-
"description": "",
|
200
|
-
"x": 165,
|
201
|
-
"y": 320.6,
|
202
|
-
"width": 157.2,
|
203
|
-
"height": 17,
|
204
|
-
"style": {
|
205
|
-
"font-family": [
|
206
|
-
"Helvetica"
|
207
|
-
],
|
208
|
-
"font-size": 18,
|
209
|
-
"color": "#000000",
|
210
|
-
"text-align": "left",
|
211
|
-
"vertical-align": "top",
|
212
|
-
"line-height": "",
|
213
|
-
"line-height-ratio": "",
|
214
|
-
"letter-spacing": "",
|
215
|
-
"font-style": [],
|
216
|
-
"overflow": "truncate",
|
217
|
-
"word-wrap": "none"
|
218
|
-
},
|
219
|
-
"reference-id": "",
|
220
|
-
"value": "",
|
221
|
-
"multiple-line": false,
|
222
|
-
"format": {
|
223
|
-
"base": "",
|
224
|
-
"type": ""
|
225
|
-
}
|
226
|
-
},
|
227
|
-
{
|
228
|
-
"id": "block_single32",
|
229
|
-
"type": "text-block",
|
230
|
-
"display": true,
|
231
|
-
"description": "",
|
232
|
-
"x": 345,
|
233
|
-
"y": 320.6,
|
234
|
-
"width": 230.2,
|
235
|
-
"height": 17,
|
236
|
-
"style": {
|
237
|
-
"font-family": [
|
238
|
-
"Helvetica"
|
239
|
-
],
|
240
|
-
"font-size": 18,
|
241
|
-
"color": "#000000",
|
242
|
-
"text-align": "left",
|
243
|
-
"vertical-align": "top",
|
244
|
-
"line-height": "",
|
245
|
-
"line-height-ratio": "",
|
246
|
-
"letter-spacing": "",
|
247
|
-
"font-style": [],
|
248
|
-
"overflow": "truncate",
|
249
|
-
"word-wrap": "none"
|
250
|
-
},
|
251
|
-
"reference-id": "",
|
252
|
-
"value": "",
|
253
|
-
"multiple-line": false,
|
254
|
-
"format": {
|
255
|
-
"base": "",
|
256
|
-
"type": ""
|
257
|
-
}
|
258
|
-
},
|
259
|
-
{
|
260
|
-
"id": "block_multiple18",
|
261
|
-
"type": "text-block",
|
262
|
-
"display": true,
|
263
|
-
"description": "",
|
264
|
-
"x": 40,
|
265
|
-
"y": 390,
|
266
|
-
"width": 103.4,
|
267
|
-
"height": 113.3,
|
268
|
-
"style": {
|
269
|
-
"font-family": [
|
270
|
-
"Helvetica"
|
271
|
-
],
|
272
|
-
"font-size": 18,
|
273
|
-
"color": "#000000",
|
274
|
-
"text-align": "left",
|
275
|
-
"vertical-align": "top",
|
276
|
-
"line-height": "",
|
277
|
-
"line-height-ratio": "",
|
278
|
-
"letter-spacing": "",
|
279
|
-
"font-style": [],
|
280
|
-
"overflow": "truncate",
|
281
|
-
"word-wrap": "none"
|
282
|
-
},
|
283
|
-
"reference-id": "",
|
284
|
-
"value": "",
|
285
|
-
"multiple-line": true,
|
286
|
-
"format": {
|
287
|
-
"base": "",
|
288
|
-
"type": ""
|
289
|
-
}
|
290
|
-
},
|
291
|
-
{
|
292
|
-
"id": "block_multiple24",
|
293
|
-
"type": "text-block",
|
294
|
-
"display": true,
|
295
|
-
"description": "",
|
296
|
-
"x": 165,
|
297
|
-
"y": 390,
|
298
|
-
"width": 157.2,
|
299
|
-
"height": 113.3,
|
300
|
-
"style": {
|
301
|
-
"font-family": [
|
302
|
-
"Helvetica"
|
303
|
-
],
|
304
|
-
"font-size": 18,
|
305
|
-
"color": "#000000",
|
306
|
-
"text-align": "left",
|
307
|
-
"vertical-align": "top",
|
308
|
-
"line-height": "",
|
309
|
-
"line-height-ratio": "",
|
310
|
-
"letter-spacing": "",
|
311
|
-
"font-style": [],
|
312
|
-
"overflow": "truncate",
|
313
|
-
"word-wrap": "none"
|
314
|
-
},
|
315
|
-
"reference-id": "",
|
316
|
-
"value": "",
|
317
|
-
"multiple-line": true,
|
318
|
-
"format": {
|
319
|
-
"base": "",
|
320
|
-
"type": ""
|
321
|
-
}
|
322
|
-
},
|
323
|
-
{
|
324
|
-
"id": "block_multiple32",
|
325
|
-
"type": "text-block",
|
326
|
-
"display": true,
|
327
|
-
"description": "",
|
328
|
-
"x": 345,
|
329
|
-
"y": 390,
|
330
|
-
"width": 230.2,
|
331
|
-
"height": 113.3,
|
332
|
-
"style": {
|
333
|
-
"font-family": [
|
334
|
-
"Helvetica"
|
335
|
-
],
|
336
|
-
"font-size": 18,
|
337
|
-
"color": "#000000",
|
338
|
-
"text-align": "left",
|
339
|
-
"vertical-align": "top",
|
340
|
-
"line-height": "",
|
341
|
-
"line-height-ratio": "",
|
342
|
-
"letter-spacing": "",
|
343
|
-
"font-style": [],
|
344
|
-
"overflow": "truncate",
|
345
|
-
"word-wrap": "none"
|
346
|
-
},
|
347
|
-
"reference-id": "",
|
348
|
-
"value": "",
|
349
|
-
"multiple-line": true,
|
350
|
-
"format": {
|
351
|
-
"base": "",
|
352
|
-
"type": ""
|
353
|
-
}
|
354
|
-
}
|
355
|
-
],
|
356
|
-
"state": {
|
357
|
-
"layout-guides": [
|
358
|
-
{
|
359
|
-
"type": "x",
|
360
|
-
"position": 164.4
|
361
|
-
},
|
362
|
-
{
|
363
|
-
"type": "x",
|
364
|
-
"position": 344.1
|
365
|
-
},
|
366
|
-
{
|
367
|
-
"type": "y",
|
368
|
-
"position": 503.3
|
369
|
-
}
|
370
|
-
]
|
371
|
-
},
|
372
|
-
"title": "FontSize",
|
373
|
-
"report": {
|
374
|
-
"paper-type": "A4",
|
375
|
-
"orientation": "portrait",
|
376
|
-
"margin": [
|
377
|
-
20,
|
378
|
-
20,
|
379
|
-
20,
|
380
|
-
20
|
381
|
-
]
|
382
|
-
}
|
383
|
-
}
|
@@ -1,43 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
example :tblock_styles, 'Set the styles of Tblock in the Editor' do |t|
|
4
|
-
Thinreports::Report.generate filename: t.output_filename do |report|
|
5
|
-
report.use_layout t.layout_filename
|
6
|
-
|
7
|
-
report.start_new_page do |page|
|
8
|
-
page.item(:space_single_helvetica).value('Char Space in Single(Helvetica)')
|
9
|
-
page.item(:space_single_ipamincho).value = '文字間隔 in 単行(IPA明朝)'
|
10
|
-
|
11
|
-
page[:space_multi_times] = "Char Space\nin Multiple(Times New Roman)"
|
12
|
-
page.item(:space_multi_ipamincho).value("文字間隔\nin 複数行(IPA明朝)")
|
13
|
-
|
14
|
-
page.values(left_top: '左上揃え',
|
15
|
-
left_center: '左中央揃え',
|
16
|
-
left_bottom: '左下揃え',
|
17
|
-
center_top: '中央上揃え',
|
18
|
-
center_center: '中央揃え',
|
19
|
-
center_bottom: '中央下揃え',
|
20
|
-
right_top: '右上揃え',
|
21
|
-
right_center: '右中央揃え',
|
22
|
-
right_bottom: '右下揃え')
|
23
|
-
|
24
|
-
page.item(:line_height).value("行間隔2.0\n日本語\nThinreports")
|
25
|
-
end
|
26
|
-
|
27
|
-
report.start_new_page layout: t.resource('font_size.tlf') do |page|
|
28
|
-
page[:text_single24].style(:font_size, 24)
|
29
|
-
page[:text_single32].style(:font_size, 32)
|
30
|
-
|
31
|
-
page.item(:text_multiple24).style(:font_size, 24)
|
32
|
-
page.item(:text_multiple32).style(:font_size, 32)
|
33
|
-
|
34
|
-
page.item(:block_single18).value('サイズ18')
|
35
|
-
page.item(:block_single24).style(:font_size, 24).value('サイズ24')
|
36
|
-
page.item(:block_single32).style(:font_size, 32).value('サイズ32')
|
37
|
-
|
38
|
-
page.item(:block_multiple18).value("サイズ18\nサイズ18")
|
39
|
-
page.item(:block_multiple24).style(:font_size, 24).value("サイズ24\nサイズ24")
|
40
|
-
page.item(:block_multiple32).style(:font_size, 32).value("サイズ32\nサイズ32")
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|