Class: Asciidoctor::Diagram::BpmnConverter
Instance Method Summary
collapse
#generate_file, #generate_file_stdout, #generate_stdin, #generate_stdin_file, #generate_stdin_stdout
#native_scaling?, #wrap_source
Instance Method Details
#collect_options(source) ⇒ Object
18
19
20
21
22
23
24
25
|
# File 'lib/asciidoctor-diagram/bpmn/converter.rb', line 18
def collect_options(source)
options = {}
options[:width] = source.attr('width')
options[:height] = source.attr('height')
options
end
|
#convert(source, format, options) ⇒ Object
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
# File 'lib/asciidoctor-diagram/bpmn/converter.rb', line 27
def convert(source, format, options)
opts = {}
opts[:width] = options[:width]
bpmnjs = source.find_command('bpmn-js')
opts[:height] = options[:height]
opts[:theme] = options[:theme]
config = options[:config]
if config
opts[:config] = source.resolve_path(config)
end
run_bpmnjs(bpmnjs, source, format, opts)
end
|
14
15
16
|
# File 'lib/asciidoctor-diagram/bpmn/converter.rb', line 14
def supported_formats
[:png, :svg, :pdf, :jpeg]
end
|