-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathwhite_christmas.xl
685 lines (577 loc) · 26 KB
/
white_christmas.xl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
// *****************************************************************************
// white_christmas.xl Tao3D project
// *****************************************************************************
//
// File description:
//
// White Christmas - A theme specially designed for the Christmas period
//
//
//
//
//
//
//
//
// *****************************************************************************
// This software is licensed under the GNU General Public License v3
// (C) 2014,2019, Christophe de Dinechin <[email protected]>
// (C) 2014, Jérôme Forissier <[email protected]>
// *****************************************************************************
// This file is part of Tao3D
//
// Tao3D is free software: you can r redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Tao3D is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Tao3D, in a file named COPYING.
// If not, see <https://www.gnu.org/licenses/>.
// *****************************************************************************
import Slides
import Charts
import Filters
import Animate
module_description
id "5AA89E50-7DB0-412F-AA77-53E28447A302"
name "White Christmas theme"
description "A white theme, specially designed for Christmas greetings"
import_name "WhiteChristmasTheme"
author "Taodyne SAS"
website "http://www.taodyne.com"
version 1.001
module_description "fr",
name "Noel Blanc"
description "Un thème en blanc, spécialement réalisé pour la période des fêtes de Noël"
add_search_path "WhiteChristmas:", module_dir
theme_slide_width "WhiteChristmas" -> 1920
theme_slide_height "WhiteChristmas" -> 1080
theme_drawing_width "WhiteChristmas" -> 1000
theme_drawing_height "WhiteChristmas" -> 850
// ============================================================================
//
// Charts
//
// ============================================================================
theme_color "WhiteChristmas", Master:text, "line", N -> line_color_hsv 20 + 157.5 * N, 0.5, 0.9, 0.9
theme_color "WhiteChristmas", "pie", Style:text, N:integer -> theme_color "WhiteChristmas", "bar", Style, N
theme_color "WhiteChristmas", "area", Style:text, N:integer -> theme_color "WhiteChristmas", "bar", Style, N
theme_color "WhiteChristmas", "line", Style:text, N:integer -> theme_color "WhiteChristmas", "bar", Style, N
theme_color "WhiteChristmas", "bar", Style:text, N ->
color_hsv 20 + 157.5 * N, 0.3, 0.9, 0.7
line_color_hsv 20 + 157.5 * N, 0.5, 0.6, 0.7
theme_box "WhiteChristmas", Master:text, "area", X:real,Y:real,W:real,H:real -> false
theme_box "WhiteChristmas", Master:text, "bar", X:real,Y:real,W:real,H:real -> false
theme_box "WhiteChristmas", Master:text, "line", X:real,Y:real,W:real,H:real -> false
theme_box "WhiteChristmas", Master:text, "pie", X:real,Y:real,W:real,H:real -> false
theme_box "WhiteChristmas",Master:text,"chart_title",X:real,Y:real,W:real,H:real -> false
theme_chart "WhiteChristmas", Master:text, Style:text, "3D", W:real, H:real, N:integer, Index:integer ->
// ----------------------------------------------------------------------------
// Display 3D chart part
// ----------------------------------------------------------------------------
Ratio := chart_data_ratio(N, Index)
locally
radial_gradient (W+10)/2, (H+10)/2, (W+H)/2, W+10, H+10,
gradient_color 0.0, 1, 1, 1, 0.5
gradient_color 0.5, 1, 1, 1, 0.75
gradient_color 1.0, 1, 1, 1, 1.0
theme_chart "WhiteChristmas", Master, Style, "3D", W, H, N, Index, Ratio
theme_chart "WhiteChristmas", Master:text, Style:text, Format:text, W:real, H:real, N:integer, Index:integer ->
// ----------------------------------------------------------------------------
// Display chart part
// ----------------------------------------------------------------------------
Ratio := chart_data_ratio(N, Index)
locally
radial_gradient (W+10)/2, (H+10)/2, (W+H)/2, W+10, H+10,
gradient_color 0.0, 1, 1, 1, 0.5
gradient_color 0.5, 1, 1, 1, 0.75
gradient_color 1.0, 1, 1, 1, 1.0
theme_chart "WhiteChristmas", Master, Style, Format, W, H, N, Index, Ratio
theme_chart_layout "WhiteChristmas", "pie", Style:text, Format:text ->
// ----------------------------------------------------------------------------
// Default pie chart layout
// ----------------------------------------------------------------------------
// Draw components
chart_flow -300, 525, 800, 50, "chart_title"
chart_flow 525, -30, 300, 600, "chart_legend"
// Draw chart
box "pie", 0, -30, 600, 600
chart_series -300, -25, 900, 900, "pie", Style, Format
theme_chart_layout "WhiteChristmas", Master:text, Style:text, Format:text ->
// ----------------------------------------------------------------------------
// Chart layout for White Christmas
// ----------------------------------------------------------------------------
// Draw main box
// box "chart", 0, 0, chart_width, chart_height
// Draw axis
chart_xaxis -450, -475, 1100, 900, Style, Format
chart_yaxis -450, -475, 1100, 900, Style, Format
chart_flow 100, 525, 800, 50, "chart_title"
chart_flow 435, -275, 100, 50, "chart_xlabel"
chart_flow -400, 250, 100, 50, "chart_ylabel"
chart_flow -725, -30, 300, 600, "chart_legend"
// Draw chart
// box Master, -175, -30, 1400, 600
chart_series -450, -475, 1100, 900, Master, Style, Format
// ============================================================================
//
// Slides
//
// ============================================================================
white_christmas_current -> 0.0
white_christmas_target -> 0.0
theme_background "WhiteChristmas",Master:text ->
// ----------------------------------------------------------------------------
// Background shows a number of stars, circles and "sprinkles"
// ----------------------------------------------------------------------------
clear_color 0, 0, 0, 1
background -900,
radial_gradient 480, 270, 400, 960, 540,
gradient_color 0, 1,1,1,1
gradient_color 0.4, 0.95,0.95,0.95,1
gradient_color 1, 0.9, 0.9, 0.9, 1
color "#C8D6E0"
rectangle slide_width, slide_height
background -800,
white_christmas_target := hours*60+minutes + 111 * page_number
if abs(white_christmas_current - white_christmas_target) > 1000 then
white_christmas_current := white_christmas_target
white_christmas_current := 0.9 * white_christmas_current + 0.1 * white_christmas_target
if abs(white_christmas_current - white_christmas_target) > 0.2 then
time
shadow_blur 12.0
color "white", 0.98
white_christmas_star with 1..5
white_christmas_circle with 1..3
white_christmas_sprinkle with 1..8
white_christmas_star N ->
locally
translate_x -700 + 150*white_christmas_random(833e-5, 1.1*N)
translate_y 300 - 150 * N + 20 * white_christmas_random(951e-5, 2.3*N)
white_christmas_star_scaled "WhiteChristmas:star" & N & ".png", 0.5 + 0.3 * white_christmas_random(1043e-5,4.7*N), -180 + 360 * white_christmas_random(177e-5, 1.03*N)
white_christmas_star_scaled T:text, S:real, A:real ->
locally
shadow_scaled_texture 400, 400, 6,
rotate_z A
scale S
texture T
color "white", 0.7
rectangle texture_width, texture_height
translate -45 * S, -45 * S, -50 * S
color "#C8D6E0", 0.98
rectangle 400, 400
locally
rotate_z A
scale S
texture T
rectangle texture_width, texture_height
white_christmas_circle N ->
locally
translate_x -700 + 120 * white_christmas_random(543e-5, 1.13*N)
translate_y 300 - 90 * N + 80 * white_christmas_random(673e-5, 2.71*N)
translate_z 300 + 100 * N + 50*white_christmas_random(833e-5, 1.13*N)
color "white", 0.2 + 0.1 * white_christmas_random(21e-5, 4.41*N)
circle 0, 0, 20 + 10 * white_christmas_random(701e-5, 3.41*N)
white_christmas_sprinkle N ->
locally
translate_x 0.45*slide_width * white_christmas_random(543e-5, 1.13*N)
translate_y 0.45*slide_height * white_christmas_random(673e-5, 2.71*N)
translate_z 800 + 200*white_christmas_random(833e-5, 1.13*N)
color "white", 0.4 + 0.2 * white_christmas_random(21e-5, 4.41*N)
path
line_to 20*white_christmas_random(421e-5, 3.37*N), 20*white_christmas_random(662e-5, 1.37*N)
line_to 20*white_christmas_random(797e-5, 2.01*N), 20*white_christmas_random(255e-5, 3.101*N)
line_to 20*white_christmas_random(444e-5, 4.44*N), 20*white_christmas_random(991e-5, 4.8*N)
close_path
theme_foreground "WhiteChristmas",Master:text ->
// ----------------------------------------------------------------------------
// Foreground draws the dangling items on the right
// ----------------------------------------------------------------------------
background 50,
shadow_blur 12.0
shadow_scaled_texture 150, slide_height, 5,
color "white", 0.2
ellipse 0, 0, 100, 0.85*slide_height
color "white", 0.98
rectangle 500, 0, 100, slide_height
linear_gradient 0, 0, 0, 128, 128, 128,
gradient_color 0.0, 0.85, 0.89, 0.91, 1.0
gradient_color 0.4, 0.94, 0.94, 0.94, 1.0
gradient_color 0.6, 0.94, 0.94, 0.94, 1.0
gradient_color 1.0, 0.85, 0.89, 0.91, 1.0
color "white", 0.98
rectangle 750, 0, 500, slide_height * 1.1
white_christmas_initialize_danglers
white_christmas_dangling N, X, Y ->
locally
translate X + 750, Y + 480, 10
translate_y 200
rotate_z 3 * sin((0.57 + 0.016 * N) * time)
translate_y -200
texture white_christmas_dangling_texture N
color "white", 0.98
rectangle 512, 512
white_christmas_dangling 1, 100, 50
white_christmas_dangling 2, 40, 20
white_christmas_dangling 3, -50, -120
white_christmas_dangling 4, -20, -200
white_christmas_dangling 5, 70, -110
white_christmas_dangling 6, -180, 140
white_christmas_dangling 7, -100, 30
white_christmas_dangling_texture 1 -> 0
white_christmas_dangling_texture 2 -> 0
white_christmas_dangling_texture 3 -> 0
white_christmas_dangling_texture 4 -> 0
white_christmas_dangling_texture 5 -> 0
white_christmas_dangling_texture 6 -> 0
white_christmas_dangling_texture 7 -> 0
white_christmas_initialize_danglers ->
// ----------------------------------------------------------------------------
// Initialize textures for the dangling items on the right
// ----------------------------------------------------------------------------
// This is done solely to accelerate drawing, as rendering the shadows
// is a relativey expensive process
locally
shadow_blur 13
shadow_angle 220
shadow_offset 15
shadow_opacity 75%
shadow_color "#036"
white_christmas_init_dangling N, S, W, F ->
frame_texture 512, 512,
shadow 0, 0, 512, 512,
texture F
rectangle 0, -250 + S*texture_height/2, S*texture_width, S*texture_height
translate_y -250 + S*texture_height
texture ""
rectangle 0, 300, W, 630
white_christmas_texture_set (white_christmas_dangling_texture N)
white_christmas_texture_set N:integer -> N := texture
white_christmas_init_dangling 1, 0.9, 6, "WhiteChristmas:star1.png"
white_christmas_init_dangling 2, 1.0, 7, "WhiteChristmas:ring1.png"
white_christmas_init_dangling 3, 0.5, 5, "WhiteChristmas:ring2.png"
white_christmas_init_dangling 4, 0.4, 4, "WhiteChristmas:star3.png"
white_christmas_init_dangling 5, 0.4, 6, "WhiteChristmas:star4.png"
white_christmas_init_dangling 6, 0.3, 3, "WhiteChristmas:star5.png"
white_christmas_init_dangling 7, 0.8, 6, "WhiteChristmas:star2.png"
theme_size "WhiteChristmas",Master:text,"title" -> 80
theme_size "WhiteChristmas",Master:text,"subtitle" -> 95
theme_size "WhiteChristmas",Master:text,"story" -> 42
theme_size "WhiteChristmas",Master:text,"story",1 -> 42
theme_size "WhiteChristmas",Master:text,"story",2 -> 38
theme_size "WhiteChristmas",Master:text,"story",3 -> 32
theme_size "WhiteChristmas",Master:text,"story",4 -> 30
theme_color "WhiteChristmas",Master:text,"title" ->
color "#333"
theme_color "WhiteChristmas",Master:text,"story" ->
color "#777"
theme_font "WhiteChristmas",Master:text,"title" ->
font "Alex Brush"
theme_font "WhiteChristmas",Master:text,"subtitle" ->
font "Alex Brush"
theme_font "WhiteChristmas",Master:text,"story" ->
font "Open Sans"
theme_align "WhiteChristmas",Master:text,"story" ->
align 0.0
vertical_align 0.8
theme_align "WhiteChristmas",Master:text,"story", N ->
margins 5+50*N, 0
theme_align "WhiteChristmas",Master:text,"subtitle" ->
align 0.2
rotate_z 4
theme_boxstyle "WhiteChristmas",Master:text,Style:text ->
linear_gradient 0, 0, 0, 128, 128, 128,
gradient_color 0.0, 0.8, 0.8, 0.8, 1.0
gradient_color 0.5, 0.9, 0.9, 0.9, 1.0
gradient_color 1.0, 0.8, 0.8, 0.8, 1.0
color "white", 0.98
line_color "white"
theme_box "WhiteChristmas",Master:text,"title", X:real,Y:real,W:real,H:real ->
// ----------------------------------------------------------------------------
// The title is put in a big circle
// ----------------------------------------------------------------------------
contents 50,
color "white", 0.95
locally
shadow_blur 12.0
shadow_angle 220
shadow_scaled_texture W+120, H+120, 10,
color "white", 0.5
ellipse 0, 0, W+30, H+30
translate -45, -45, -50
color "#C8D6E0", 0.98
rectangle X, Y, W+120, H+120
white_christmas_ellipse X, Y, W+30, H+30, 6
white_christmas_ellipse X:real, Y:real, W:real, H:real, LW:real ->
// ----------------------------------------------------------------------------
// Draw a White-Christmas themed ellipse
// ----------------------------------------------------------------------------
linear_gradient 0, 0, 0, 128, 128, 128,
gradient_color 0.0, 0.9, 0.9, 0.9, 1.0
gradient_color 0.4, 1.0, 1.0, 1.0, 1.0
gradient_color 0.6, 1.0, 1.0, 1.0, 1.0
gradient_color 1.0, 0.9, 0.9, 0.9, 1.0
ellipse X, Y, W, H
linear_gradient 0, 0, 0, 128, 128, 128,
gradient_color 0.0, 1.0, 1.0, 1.0, 1.0
gradient_color 1.0, 0.8, 0.8, 0.8, 1.0
color "transparent"
line_color "white"
line_width LW
ellipse X, Y, W, H
theme_box "WhiteChristmas",Master:text,"subtitle",X:real,Y:real,W:real,H:real ->
// ----------------------------------------------------------------------------
// The subtitle is draw as is
// ----------------------------------------------------------------------------
false
theme_flow "WhiteChristmas",Master:text,"title",X:real,Y:real,W:real,H:real,Body ->
// ----------------------------------------------------------------------------
// Draw a title text box
// ----------------------------------------------------------------------------
theme_box "WhiteChristmas", Master, "title", X, Y, W, H
contents 80,
text_box X, Y, W, H,
theme_style "WhiteChristmas", Master, "title"
Body
theme_flow "WhiteChristmas",Master:text,"subtitle",X:real,Y:real,W:real,H:real,Body ->
// ----------------------------------------------------------------------------
// Draw a subtitle text box
// ----------------------------------------------------------------------------
theme_box "WhiteChristmas", Master, "subtitle", X, Y, W, H
contents 80,
shadow_blur 5.0
shadow_angle 220
locally
shadow_scaled_texture W+120, H+120, 4,
color "white", 0.5
text_box 0, 0, W, H,
theme_style "WhiteChristmas", Master, "title"
Body
translate -45, -45, -50
color "#C8D6E0"
rectangle X, Y, W+120, H+120
text_box X, Y, W, H,
theme_style "WhiteChristmas", Master, "title"
Body
theme_box "WhiteChristmas",Master,Style, X:real,Y:real,W:real,H:real ->
// ----------------------------------------------------------------------------
// Other boxes are in a white rounded-rectangle box
// ----------------------------------------------------------------------------
contents -200,
color "white", 0.95
locally
shadow_blur 12.0
shadow_angle 220
shadow_scaled_texture W+120, H+120, 10,
color "white", 0.5
rounded_rectangle 0, 0, W+30, H+30, 20
translate -45, -45, -50
color "#C8D6E0", 0.98
rectangle X, Y, W+120, H+120
linear_gradient 0, 0, 0, 128, 128, 128,
gradient_color 0.0, 0.8, 0.8, 0.8, 1.0
gradient_color 0.4, 1.0, 1.0, 1.0, 1.0
gradient_color 0.6, 1.0, 1.0, 1.0, 1.0
gradient_color 1.0, 0.8, 0.8, 0.8, 1.0
rounded_rectangle X, Y, W + 10, H + 10, 20
linear_gradient 0, 0, 0, 128, 128, 128,
gradient_color 0.0, 1.0, 1.0, 1.0, 1.0
gradient_color 1.0, 0.8, 0.8, 0.8, 1.0
color "transparent"
line_color "white"
line_width 6
rounded_rectangle X, Y, W + 10, H + 10, 20
theme_bullet_picture "WhiteChristmas", Master:text, Level:integer ->
// ----------------------------------------------------------------------------
// The bullet is a simple circle
// ----------------------------------------------------------------------------
white_christmas_bullet S:real ->
white_christmas_ellipse -20, 18, 12, 12, 4
white_christmas_bullet theme_size(theme, Master, "bullet", Level)
theme_layout "WhiteChristmas", "section" ->
// ----------------------------------------------------------------------------
// Centered flows
// ----------------------------------------------------------------------------
flow -700, 300, 400, 400, "title"
flow 0, 100, 1000, 800, "subtitle"
theme_layout "WhiteChristmas", Master:text ->
// ----------------------------------------------------------------------------
// Centered flows
// ----------------------------------------------------------------------------
flow -50, 0, 1100, 950, "story"
flow 0, 0, 1250, 850, "picture"
flow -330, 0, 550, 950, "left"
flow 250, 0, 550, 950, "right"
flow -330, 0, 550, 800, "leftpic"
flow 250, 0, 550, 800, "rightpic"
flow -700, 300, 400, 400, "title"
flow 0, 400, 1000, 200, "subtitle"
// ============================================================================
//
// Theme specific functions
//
// ============================================================================
white_christmas_title_picture P:text, Transform ->
// ----------------------------------------------------------------------------
// Draw a picture in the title circle with an arbitrary transform
// ----------------------------------------------------------------------------
contents 100,
texture P
color "white", 0.98
Transform
ellipse -700, 300, 410, 410
white_christmas_title_picture P:text ->
// ----------------------------------------------------------------------------
// Draw a picture in the title circle
// ----------------------------------------------------------------------------
white_christmas_title_picture P,
texture_transform
if texture_width > texture_height then
scale_x texture_width/texture_height
else if texture_width < texture_height then
scale_y texture_height/texture_width
white_christmas_random R:real,S:real -> sin(R*white_christmas_current+S)
// ----------------------------------------------------------------------------
// A simple pseudo-random function
// ----------------------------------------------------------------------------
// ============================================================================
//
// Temporary fix for #3346
//
// ============================================================================
theme_foreground Theme:text,Master:text -> false
theme_color Theme:text,Master:text,"leftpic" -> color "white"
theme_color Theme:text,Master:text,"rightpic" -> color "white"
theme_color "WhiteChristmas",Master:text,"leftpic" -> color "white"
theme_color "WhiteChristmas",Master:text,"rightpic" -> color "white"
theme_boxstyle Theme:text,Master:text,"picture" -> color "black", 0.0
theme_boxstyle Theme:text,Master:text,"leftpic" -> color "black", 0.0
theme_boxstyle Theme:text,Master:text,"rightpic"-> color "black", 0.0
theme_picture Theme:text, Master:text, Body ->
text_flow "picture",
theme_style Theme, Master, "picture"
Body
theme_left_column_picture Theme:text, Master:text, Body ->
text_flow "leftpic",
theme_style Theme, Master, "leftpic"
Body
theme_right_column_picture Theme:text, Master:text, Body ->
text_flow "rightpic",
theme_style Theme, Master, "rightpic"
Body
theme_layout Theme:text, "main" ->
flow 0, 50, 1800, 400, "title"
flow 0, -300, 1800, 200, "subtitle"
flow 0, -300, 1800, 200, "story"
flow -475, -300, 850, 200, "left"
flow 475, -300, 850, 200, "right"
flow 0, -300, 1800, 400, "picture"
flow -475, -300, 850, 200, "leftpic"
flow 475, -300, 850, 200, "rightpic"
theme_layout Theme:text, "section" ->
flow 0, 50, 1800, 250, "title"
flow 0, -300, 1800, 150, "subtitle"
flow 0, -300, 1800, 750, "story"
flow -475, -300, 850, 750, "left"
flow 475, -300, 850, 750, "right"
flow 0, -300, 1800, 750, "picture"
flow -475, -300, 850, 750, "leftpic"
flow 475, -300, 850, 750, "rightpic"
theme_layout Theme:text, "blank" ->
flow 0, 50, 1800, 250, "title"
flow 0, -300, 1800, 150, "subtitle"
flow 0, 0, 1800, 750, "story"
flow -475, 0, 850, 750, "left"
flow 475, 0, 850, 750, "right"
flow 0, 0, 1800, 750, "picture"
flow -475, 0, 850, 750, "leftpic"
flow 475, 0, 850, 750, "rightpic"
theme_layout Theme:text, Master:text ->
flow 0, -120, 1800, 750, "picture"
flow -475, -120, 850, 750, "leftpic"
flow 475, -120, 850, 750, "rightpic"
flow 0, -120, 1800, 750, "story"
flow -475, -120, 850, 750, "left"
flow 475, -120, 850, 750, "right"
flows 0, 400, 1800, 220, "title", "subtitle"
theme_box Theme:text,Master:text,"picture", X:real,Y:real,W:real,H:real -> nil
theme_box Theme:text,Master:text,"leftpic", X:real,Y:real,W:real,H:real -> nil
theme_box Theme:text,Master:text,"rightpic", X:real,Y:real,W:real,H:real -> nil
theme_flow Theme:text,Master:text,Style:text,X:real,Y:real,W:real,H:real,Body ->
theme_box Theme, Master, Style, X, Y, W, H
contents 0,
theme_body Theme, Master, Style, X, Y, W, H,
theme_style Theme, Master, Style
Body
theme_body Theme:text,Master:text,"picture",X:real,Y:real,W:real,H:real,Body ->
translate X, Y, 0
Body
theme_body Theme:text,Master:text,"leftpic",X:real,Y:real,W:real,H:real,Body ->
translate X, Y, 0
Body
theme_body Theme:text,Master:text,"rightpic",X:real,Y:real,W:real,H:real,Body ->
translate X, Y, 0
Body
theme_body Theme:text,Master:text,Style:text,X:real,Y:real,W:real,H:real,Body ->
text_box X, Y, W, H, Body
slide_master Theme:text, Master:text, Title:text, Body ->
page Title,
old_theme -> ""
old_theme := Theme
theme_background Theme, Master
locally
layout "ThemeReset"
slide_master := Master
slide_reset theme
theme_reset theme
Body
theme_layout Theme, Master
theme_foreground Theme, Master
// User changed theme from within slide : refresh whole slide
if theme <> old_theme then refresh 0
slide_reset Theme ->
slide_flow["title"] := false
slide_flow["subtitle"] := false
slide_flow["story"] := false
slide_flow["left"] := false
slide_flow["right"] := false
slide_flow["leftpic"] := false
slide_flow["rightpic"] := false
box X:real, Y:real, W:real, H:real, Body ->
theme_flow theme, slide_master, "story", X, Y, W, H, Body
box Style:text, X:real, Y:real, W:real, H:real, Body ->
theme_flow theme, slide_master, Style, X, Y, W, H, Body
flow X:real, Y:real, W:real, H:real, Flow:text ->
flow_name -> ""
flow_name := Flow
if slide_flow[flow_name] then
theme_flow theme, slide_master, flow_name, X, Y, W, H,
text_flow Flow
slide_flow[flow_name] := false
flows X:real, Y:real, W:real, H:real, Flow1:text, Flow2:text ->
flow_name1 -> ""
flow_name2 -> ""
flow_name1 := Flow1
flow_name2 := Flow2
if slide_flow[flow_name1] then
theme_flow theme, slide_master, flow_name1, X, Y, W, H,
text_flow Flow1
if slide_flow[flow_name2] then
paragraph_break
text_flow Flow2
else if slide_flow[flow_name2] then
theme_flow theme, slide_master, flow_name1, X, Y, W, H,
text_flow Flow2
slide_flow[flow_name1] := false
slide_flow[flow_name2] := false
// ============================================================================
//
// End of temporary fix for #3346
//
// ============================================================================