diff --git a/doc/data-model.rst b/doc/data-model.rst index d8b152993eaa97465f539a9e30a6ffd1cabbf579..634ed899f93911bd274a1d51f0291d140f6889a5 100644 --- a/doc/data-model.rst +++ b/doc/data-model.rst @@ -11,7 +11,13 @@ The data model implemented in this package is summarized in the following figure: -.. figure:: img/data-model.png +.. image:: img/data-model-lite.png + :align: center + :class: only-light + +.. image:: img/data-model-dark.png + :align: center + :class: only-dark Each of the elements is described next. diff --git a/doc/img/Makefile b/doc/img/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..4041086b519904ef46062089e7798e1512f9d6de --- /dev/null +++ b/doc/img/Makefile @@ -0,0 +1,20 @@ +# SPDX-FileCopyrightText: Copyright © 2024 Idiap Research Institute <contact@idiap.ch> +# +# SPDX-License-Identifier: GPL-3.0-or-later + +MAINFILES=data-model.dot +LITE_PNGFILES=$(MAINFILES:%.dot=%-lite.png) +DARK_PNGFILES=$(MAINFILES:%.dot=%-dark.png) + +.PHONY: FORCE_MAKE clean + +all: $(LITE_PNGFILES) $(DARK_PNGFILES) + +%-lite.png: %.dot FORCE_MAKE + dot -Tpng -Gbgcolor="white" -Nfontcolor="black" -Ncolor="black" -Efontcolor="black" -Ecolor="black" -o $@ $< + +%-dark.png: %.dot FORCE_MAKE + dot -Tpng -Gbgcolor="black" -Nfontcolor="white" -Ncolor="white" -Efontcolor="white" -Ecolor="white" -o $@ $< + +clean: + @rm -vf $(LITE_PNGFILES) $(DARK_PNGFILES) $(shell find . -name "*~") diff --git a/doc/img/data-model-dark.png b/doc/img/data-model-dark.png new file mode 100644 index 0000000000000000000000000000000000000000..2eb870d73a2704b78c3e58b1e5d11551646bd6ee Binary files /dev/null and b/doc/img/data-model-dark.png differ diff --git a/doc/img/data-model.png b/doc/img/data-model-lite.png similarity index 100% rename from doc/img/data-model.png rename to doc/img/data-model-lite.png diff --git a/doc/img/data-model.dot b/doc/img/data-model.dot index 9c7671d94d2d06cdb29438b88bbfa21ef9586062..ea2903ecfe80f78875d0e1871f2d2fc4a9ad0c33 100644 --- a/doc/img/data-model.dot +++ b/doc/img/data-model.dot @@ -3,7 +3,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later digraph G { - rankdir = T; + rankdir = TB; fontname = "Helvetica"