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:
@@ -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)
|
||||
|
||||
## @}
|
||||
|
||||
Reference in New Issue
Block a user