Refactor handling of pts attribute

In doing so, deprecate the `curve_obj["points"]` attribute, and fix
`PageImage.draw_line(...)`'s handling of diagonal lines.
This commit is contained in:
Jeremy Singer-Vine
2023-02-03 12:15:55 -05:00
parent bad8eea88d
commit 216bedd00a
5 changed files with 21 additions and 17 deletions
+3 -3
View File
@@ -70,7 +70,7 @@ class Test(unittest.TestCase):
assert c.split("\r\n")[9] == (
"char,1,45.83,58.826,656.82,674.82,117.18,117.18,135.18,12.996,"
'18.0,12.996,,,,,,TimesNewRomanPSMT,,,"(1, 0, 0, 1, 45.83, 660.69)"'
',,"(0, 0, 0)",,,18.0,,,,,Y,,1,'
',,"(0, 0, 0)",,18.0,,,,,Y,,1,'
)
io = StringIO()
@@ -125,7 +125,7 @@ class Test(unittest.TestCase):
assert res.decode("utf-8").split("\r\n")[9] == (
"char,1,45.83,58.826,656.82,674.82,117.18,117.18,135.18,12.996,"
'18.0,12.996,,,,,,TimesNewRomanPSMT,,,"(1, 0, 0, 1, 45.83, 660.69)"'
',,"(0, 0, 0)",,,18.0,,,,,Y,,1,'
',,"(0, 0, 0)",,18.0,,,,,Y,,1,'
)
def test_cli_csv_exclude(self):
@@ -147,7 +147,7 @@ class Test(unittest.TestCase):
assert res.decode("utf-8").split("\r\n")[9] == (
"char,1,45.83,58.826,656.82,674.82,117.18,117.18,135.18,12.996,"
"18.0,12.996,,,,,,TimesNewRomanPSMT,,"
',,"(0, 0, 0)",,,18.0,,,,,Y,,1,'
',,"(0, 0, 0)",,18.0,,,,,Y,,1,'
)
def test_cli_csv_include(self):