Space

class visigoth.common.space.Space(height, width=0)

Define an area of whitespace in the diagram

Parameters

height (int) – height of the whitespace in pixels

Keyword Arguments

width (int) – width of the whitespace in pixels

Example

Screenshot (Link to open SVG for interactive features):

../_images/example12.png

Source Code (Link to Github):


import os
import sys
import argparse

from visigoth import Diagram

from visigoth.common.space import Space
from visigoth.common.text import Text


if __name__ == "__main__":

    parser = argparse.ArgumentParser()
    parser.add_argument("--outpath", help="path for output SVG", default="example.svg")
    args = parser.parse_args()

    d = Diagram(fill="white")
    d.add(Text("An Example Space, see below...",font_height=32,text_attributes={"stroke":"darkblue"}))
    d.add(Space(200,200))
    d.add(Text("...did you miss it? ^^^^",font_height=32,text_attributes={"stroke":"darkblue"}))

    svg = d.draw()

    f = open(args.outpath, "wb")
    f.write(svg)
    f.close()