当前位置: 首页>>代码示例>>Python>>正文


Python Bbox.union方法代码示例

本文整理汇总了Python中transforms.Bbox.union方法的典型用法代码示例。如果您正苦于以下问题:Python Bbox.union方法的具体用法?Python Bbox.union怎么用?Python Bbox.union使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在transforms.Bbox的用法示例。


在下文中一共展示了Bbox.union方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: contains

# 需要导入模块: from transforms import Bbox [as 别名]
# 或者: from transforms.Bbox import union [as 别名]
    def contains(self, mouseevent):
        """Test whether the mouse event occurred in the table.

        Returns T/F, {}
        """
        if callable(self._contains):
            return self._contains(self, mouseevent)

        # TODO: Return index of the cell containing the cursor so that the user
        # doesn't have to bind to each one individually.
        if self._cachedRenderer is not None:
            boxes = [self._cells[pos].get_window_extent(self._cachedRenderer)
                 for pos in self._cells.iterkeys()
                 if pos[0] >= 0 and pos[1] >= 0]
            bbox = Bbox.union(boxes)
            return bbox.contains(mouseevent.x, mouseevent.y), {}
        else:
            return False, {}
开发者ID:Black-Milk,项目名称:matplotlib,代码行数:20,代码来源:table.py

示例2: get_window_extent

# 需要导入模块: from transforms import Bbox [as 别名]
# 或者: from transforms.Bbox import union [as 别名]
    def get_window_extent(self, renderer):
        "Return the bounding box of the table in window coords"
        boxes = [cell.get_window_extent(renderer) for cell in self._cells.values()]

        return Bbox.union(boxes)
开发者ID:chensunn,项目名称:PortableJekyll,代码行数:7,代码来源:table.py

示例3: get_window_extent

# 需要导入模块: from transforms import Bbox [as 别名]
# 或者: from transforms.Bbox import union [as 别名]
 def get_window_extent(self, renderer):
     'Return the bounding box of the table in window coords'
     boxes = [c.get_window_extent(renderer) for c in self._cells]
     return Bbox.union(boxes)
开发者ID:chrishowes,项目名称:matplotlib,代码行数:6,代码来源:table.py


注:本文中的transforms.Bbox.union方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。