コード例 #1
0
slide.box(height=10)

b = slide.box(width="70%", height=40, horizontal=True)
b.rect(color=COLOR1)

bb = b.box(width="fill", height="fill")
bb.rect(color=COLOR1, bg_color=COLOR2)
bb.text("Fill (width='fill')", "inner")

bb = b.box(width="fill(2)", height="fill")
bb.rect(color=COLOR1, bg_color=COLOR2)
bb.text("Fill (width='fill(2)')", "inner")

bb = b.box(width="fill(3)", height="fill")
bb.rect(color=COLOR1, bg_color=COLOR2)
bb.text("Fill (width='fill(3)')", "inner")

# The final slide #################################

slide = slides.new_slide()

# Demonstration of inline style
# we do not provide style name, but directly create
# style in place
slide.text("Have a nice day!", {"size": 60})

# RENDER THE SLIDES NOW!

slides.render("example.pdf")
コード例 #2
0
    slide.box(width=500).image("imgs/meme-rust-meeting.jpg")

    slide = slides.new_slide()
    content = slide_header(slide, "What is Rust?")
    content.box().text("""
System programming language for building
reliable and efficient software.""")

    content.box(height=20)
    content.box(width="fill", height=150, show="2+").image("imgs/history.svg")
    content.box(height=20)
    content.box(width="fill", height=350, show="3+").image("imgs/users.svg")


def outro(slides: Slides):
    slide = slides.new_slide()
    slide.box().text("Thanks, our curse has finally been lifted", s(size=50))
    slide.box(height=20)
    slide.box(show="next+").text("Now YOU have to go and spread the word about Rust",
                                 s(size=40))


intro(slides)
features(slides)
performance(slides)
memory_safety(slides)
fearless_concurrency(slides)
outro(slides)

slides.render("slides.pdf")