コード例 #1
0
ファイル: command.py プロジェクト: jesterKing/mypaint-xsheet
 def _notify_canvas_observers(self, affected_layers):
     bbox = helpers.Rect()
     for layer in affected_layers:
         layer_bbox = layer.get_bbox()
         bbox.expandToIncludeRect(layer_bbox)
     for func in self.doc.canvas_observers:
         func(*bbox)
コード例 #2
0
 def _notify_canvas_observers(self, affected_layers):
     bbox = helpers.Rect()
     for layer in affected_layers:
         layer_bbox = layer.get_bbox()
         bbox.expandToIncludeRect(layer_bbox)
     for func in self.doc.canvas_observers:
         func(*bbox)
コード例 #3
0
 def get_bbox(self):
     res = helpers.Rect()
     for layer in self.layers:
         # OPTIMIZE: only visible layers...
         # careful: currently saving assumes that all layers are included
         bbox = layer.get_bbox()
         res.expandToIncludeRect(bbox)
     return res
コード例 #4
0
 def get_bbox(self):
     res = helpers.Rect()
     for layer in self.layers:
         # OPTIMIZE: only visible layers...
         # careful: currently saving assumes that all layers are included
         bbox = layer.get_bbox()
         res.expandToIncludeRect(bbox)
     return res
コード例 #5
0
ファイル: document.py プロジェクト: manuq/gegl-examples-old
    def get_bbox(self):
        """Returns the dynamic bounding box of the document.

        This is currently the union of all the bounding boxes of all of the
        layers. It disregards the user-chosen frame.

        """
        res = helpers.Rect()
        for layer in self.layers:
            # OPTIMIZE: only visible layers...
            # careful: currently saving assumes that all layers are included
            bbox = layer.get_bbox()
            res.expandToIncludeRect(bbox)
        return res
コード例 #6
0
ファイル: document.py プロジェクト: jesterKing/mypaint-xsheet
    def get_bbox(self):
        """Returns the dynamic bounding box of the document.

        This is currently the union of all the bounding boxes of all of the
        layers. It disregards the user-chosen frame.

        """
        res = helpers.Rect()
        for layer in self.layers:
            # OPTIMIZE: only visible layers...
            # careful: currently saving assumes that all layers are included
            bbox = layer.get_bbox()
            res.expandToIncludeRect(bbox)
        return res