Source

vanhoek / examples / hello_world.py

Full commit
import os

from vanhoek.api import \
    Slide, WhiteSlide, Presentation
import vanhoek.primitives.api as primitives
import vanhoek.backends.api as backends

presentation = Presentation()

s1 = WhiteSlide([
    primitives.TextObject("Hello", (0, 100)),
    primitives.TextObject("world", (300, 300), (0.0, 1.0, 0.0, 1.0)),
    primitives.TextObject("!", (600, 500), (1.0, 0.0, 0.0, 1.0))
])

presentation.append(s1)

if not os.path.isdir("output"): os.mkdir("output")
output = backends.PNGWriter("output/slide_%04i.png")
presentation.display(output)