コード例 #1
0
ファイル: lineartist.py プロジェクト: yishizu/compas
 def clip(self):
     # box = self.viewbox()
     xlim, ylim = self.plotter.viewbox
     xmin, xmax = xlim
     ymin, ymax = ylim
     box = [[xmin, ymin], [xmax, ymin], [xmax, ymax], [xmin, ymax]]
     return intersection_line_box_xy(self.line, box)
コード例 #2
0
 def clip(self) -> List[Point]:
     """Compute the clipping points of the line for the current view box."""
     xlim, ylim = self.plotter.viewbox
     xmin, xmax = xlim
     ymin, ymax = ylim
     box = [[xmin, ymin], [xmax, ymin], [xmax, ymax], [xmin, ymax]]
     return intersection_line_box_xy(self.line, box)
コード例 #3
0
ファイル: lineartist.py プロジェクト: mpopescu/compas
 def clip(self):
     box = self.viewbox()
     return intersection_line_box_xy(self.line, box)