def test_calculate_clipping_area_starting_and_ending_in_path(self):
painter_path = QtGui.QPainterPath()
painter_path.lineTo(100, 200)
result_rect = QClippingPath.calculate_clipping_area(
painter_path.boundingRect(), 25, 30, 0)
assert(result_rect.x() == 25)
assert(result_rect.y() == painter_path.boundingRect().y())
assert(result_rect.width() == 30)
assert(result_rect.height() == painter_path.boundingRect().height())
评论列表
文章目录