handle defaults for path params

This commit is contained in:
Jan Petykiewicz 2019-04-20 15:42:42 -07:00
parent 485a7bc29d
commit 0018891200

View File

@ -30,7 +30,9 @@ __author__ = 'Jan Petykiewicz'
logger = logging.getLogger(__name__)
path_cap_map = {0: Path.Cap.Flush,
path_cap_map = {
None: Path.Cap.Flush,
0: Path.Cap.Flush,
1: Path.Cap.Circle,
2: Path.Cap.Square,
#3: custom?
@ -285,7 +287,7 @@ def read(stream: io.BufferedIOBase,
raise PatternError('Unrecognized path type: {}'.format(element.path_type))
args = {'vertices': element.xy,
'width': element.width,
'width': element.width if element.width is not None else 0.0,
'cap': cap,
}