1. Matthew Turk
  2. vanhoek

Source

vanhoek / vanhoek / slide.py

class Slide(object):
    def __init__(self, primitives = None):
        if primitives is None: primitives = []
        self.primitives = primitives

    def setup_slide(self, context):
        pass

    def render(self, context):
        self.setup_slide(context)
        for primitive in self.primitives:
            primitive.render(context)

class WhiteSlide(Slide):
    def setup_slide(self, context):
        context.set_source_rgba(1.0, 1.0, 1.0, 1.0)
        context.paint()

class BlackSlide(Slide):
    def setup_slide(self, context):
        context.set_source_rgba(0.0, 0.0, 0.0, 1.0)
        context.paint()