From 679fed425d61944183da66cbca5e77a7e43611c1 Mon Sep 17 00:00:00 2001 From: Maximilian Giller Date: Wed, 20 Feb 2019 20:00:08 +0100 Subject: [PATCH] Bounded width and height of DisplayAdapter to constructor. --- Calendar/DisplayAdapter.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Calendar/DisplayAdapter.py b/Calendar/DisplayAdapter.py index 3e20d73..613ec75 100644 --- a/Calendar/DisplayAdapter.py +++ b/Calendar/DisplayAdapter.py @@ -1,8 +1,11 @@ class DisplayAdapter (object): - """Interface for CalendarDesign output channels. - Needs implementation of width and height properties.""" - def render (self, design): - raise NotImplementedError("Functions needs to be implemented") + """Interface for CalendarDesign output channels.""" + def __init__(self, width, height): + self.width = width + self.height = height - def calibrate (self): - raise NotImplementedError("Functions needs to be implemented") \ No newline at end of file + def render (self, design): + raise NotImplementedError("Functions needs to be implemented") + + def calibrate (self): + raise NotImplementedError("Functions needs to be implemented") \ No newline at end of file