diff options
author | Thomas White <taw@bitwiz.me.uk> | 2019-04-30 18:32:50 +0200 |
---|---|---|
committer | Thomas White <taw@bitwiz.me.uk> | 2019-04-30 18:36:20 +0200 |
commit | fcdd01f2c9e2664c3d82cd764064a1e6dea70674 (patch) | |
tree | f83a421305918174b7a484297a406be67544a472 /libstorycode/storycode.y | |
parent | 8ccc8b247769d7c1dfd21d674b7e87a9370363e2 (diff) |
Use GEOMETRY for slide size
Diffstat (limited to 'libstorycode/storycode.y')
-rw-r--r-- | libstorycode/storycode.y | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/libstorycode/storycode.y b/libstorycode/storycode.y index fce8d37..4c418eb 100644 --- a/libstorycode/storycode.y +++ b/libstorycode/storycode.y @@ -73,7 +73,7 @@ %token LEFT CENTER RIGHT %token STRING %token SQOPEN SQCLOSE -%token UNIT VALUE SIZE HEXCOL +%token UNIT VALUE HEXCOL %type <n> narrative %type <s> slide @@ -364,28 +364,15 @@ style_slide: style_slide_def: %empty - /* Doesn't need set_style() */ -| style_slide_def style_slidesize { } /* Call set_style() immediately */ | style_slide_def background { set_style(ctx, "SLIDE"); } +| style_slide_def slide_geom { set_style(ctx, "SLIDE"); } /* The ones below will call set_style() themselves */ | style_slide_def style_slide_prestitle { } | style_slide_def style_slide_text { } | style_slide_def style_slide_title { } ; -style_slidesize: - SIZE length 'x' length { if ( ($2.unit != LENGTH_UNIT) - || ($4.unit != LENGTH_UNIT) ) - { - fprintf(stderr, "Wrong slide size units\n"); - } else { - stylesheet_set_slide_default_size(narrative_get_stylesheet(ctx->n), - $2.len, $4.len); - } - } -; - background: BGCOL colour { copy_col(&ctx->bgcol, $2); ctx->bggrad = GRAD_NONE; @@ -396,6 +383,11 @@ background: ctx->mask |= STYMASK_BGCOL; } ; +slide_geom: + GEOMETRY geometry { ctx->geom = $2; + ctx->mask |= STYMASK_GEOM; } +; + style_slide_prestitle: PRESTITLE '{' styledefs '}' { set_style(ctx, "SLIDE.PRESTITLE"); } ; |