Draft: makeLayer, small adjustments to keep compatibility

This follows from the migration of the Layer code
done in 831e517717.

In the older `makeLayer` function, the parameters `drawstyle`
and `transparency` could be `None`; in the new `make_layer` function,
`drawstyle` must be an explicit string, and `transparency`
must be a number. If not provided, they use default values.
This commit is contained in:
vocx-fc
2020-07-24 18:39:02 -05:00
committed by Yorik van Havre
parent abd18ff88f
commit d51955f658

View File

@@ -249,8 +249,14 @@ def makeLayer(name=None, linecolor=None, drawstyle=None,
"""Create a Layer. DEPRECATED. Use 'make_layer'."""
utils.use_instead("make_layer")
if not drawstyle:
drawstyle = "Solid"
if not transparency:
transparency = 0
return make_layer(name,
linecolor, shapecolor,
line_color=linecolor, shape_color=shapecolor,
draw_style=drawstyle, transparency=transparency)
## @}