#
# AsciiDoc Graphviz filter configuration file.
#
# Version: 1.0
# Gouici Iisaka <iisaka51 at gmail dot com>

[graphviz-filter-style]
# When the filter output image is data-uri encoded write it to the indir
# (instead of the outdir) so that encoder can find it.
ifndef::data-uri[]
graphviz-style=template="graphviz{format?-{format}}-block",subs=(),posattrs=("style","target","layout","format"),filter='graphviz2png.py {verbose?-v} -o "{outdir={indir}}/{imagesdir=}{imagesdir?/}{target}" -L {layout=dot} -F {format=png} -'
endif::data-uri[]
ifdef::data-uri[]
graphviz-style=template="graphviz{format?-{format}}-block",subs=(),posattrs=("style","target","layout","format"),filter='graphviz2png.py {verbose?-v} -o "{indir={outdir}}/{imagesdir=}{imagesdir?/}{target}" -L {layout=dot} -F {format=png} -'
endif::data-uri[]

[blockdef-open]
template::[graphviz-filter-style]

[blockdef-listing]
template::[graphviz-filter-style]

[paradef-default]
template::[graphviz-filter-style]

[graphviz-block]
template::[filter-image-blockmacro]

# EXPERIMENTAL: xhtml11 backend SVG image block.
ifdef::basebackend-xhtml11[]
[graphviz-svg-block]
<div class="imageblock"{id? id="{id}"}{align? style="text-align:{align};"}{float? style="float:{float};"}>
<div class="content">
<a class="image" href="{link}">
<object data="{imagesdir=}{imagesdir?/}{target}" type="image/svg+xml" />
{link#}</a>
</div>
<div class="title">{caption={figure-caption} {counter:figure-number}. }{title}</div>
</div>
endif::basebackend-xhtml11[]

#
# DEPRECATED: Pre 8.2.7 filter definition.
#
[blockdef-graphviz]
delimiter=^graphviz~{4,}$
template=graphviz-block
presubs=none
filter=graphviz2png.py {verbose?-v} -o "{outdir={indir}}/{target}" -L {layout=dot} -
posattrs=target,format
#
# DEPRECATED: End
#
