radar.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:echolocation 作者: hgross 项目源码 文件源码
def _add_crosshair(self):
        """
        Adds vertical, horizontal and diagonal crosshairs to the graphic scene
        """
        pen = QPen(self.crosshair_line_color)
        pen.setWidth(self.line_width)
        pen.setStyle(Qt.DotLine)
        width, height = self.width(), self.height()
        mx, my = self._get_middle()

        # horizontal
        self.scene.addLine(0, my, width, my, pen=pen)
        # vertical
        self.scene.addLine(mx, 0, mx, height, pen=pen)
        # 45°
        self.scene.addLine(0, 0, width, height, pen=pen)
        self.scene.addLine(width, 0, 0, height, pen=pen)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号