audio.py 文件源码

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

项目:bubblesub 作者: rr- 项目源码 文件源码
def _draw_video_pos(self, painter):
        if not self._api.video.current_pts:
            return
        x = self._pts_to_x(self._api.video.current_pts)
        painter.setPen(QtCore.Qt.NoPen)
        painter.setBrush(get_color(self._api, 'spectrogram/video-marker'))

        width = 7
        polygon = QtGui.QPolygonF()
        for x, y in [
            (x - width / 2, 0),
            (x + width / 2, 0),
            (x + width / 2, SLIDER_SIZE),
            (x + 1, SLIDER_SIZE + width / 2),
            (x + 1, painter.viewport().height() - 1),
            (x, painter.viewport().height() - 1),
            (x, SLIDER_SIZE + width / 2),
            (x - width / 2, SLIDER_SIZE),
        ]:
            polygon.append(QtCore.QPointF(x, y))

        painter.drawPolygon(polygon)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号