diff --git a/lib/xmet/map.py b/lib/xmet/map.py index f848639..daec184 100644 --- a/lib/xmet/map.py +++ b/lib/xmet/map.py @@ -29,14 +29,20 @@ class EquirectMap(): self.map_width = bounds[1] - bounds[3] self.map_height = bounds[0] - bounds[2] - def draw_from_file(self, cr: cairo.Context, path: str): + def draw_from_file(self, + cr: cairo.Context, + path: str, + x: float, + y: float, + width: float, + height: float): svg = Rsvg.Handle.new_from_file(path) rect = Rsvg.Rectangle() - rect.x = 0 - rect.y = 0 - rect.width = self.width - rect.height = self.height + rect.x = x + rect.y = y + rect.width = width + rect.height = height svg.render_layer(cr, None, rect)