コード例 #1
0
ファイル: test_model.py プロジェクト: vmario89/vpype
def _all_line_collection_ops(lc: LineCollection):
    lc.merge(1)
    lc.scale(2, 2)
    lc.translate(2, 2)
    lc.rotate(10)
    lc.reloop(1)
    lc.skew(4, 4)
    lc.bounds()
コード例 #2
0
ファイル: test_model.py プロジェクト: vmario89/vpype
def test_line_collection_empty_bounds():
    lc = LineCollection()
    assert lc.bounds() is None
コード例 #3
0
ファイル: test_model.py プロジェクト: vmario89/vpype
def test_line_collection_bounds():
    lc = LineCollection([(-10, 10), (-10j, 10j)])
    assert lc.width() == 20
    assert lc.height() == 20
    assert lc.bounds() == (-10, -10, 10, 10)