You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How to draw multiple shapes in one layer? (See the current code below. Now multiple shapes are drawn in that layer, but the does not seem to work. Only returning if one is returned.)
def getPaintRadialGradient1(s, x, y):
layers = []
r1 = {
"Format": ot.PaintFormat.PaintRadialGradient,
"ColorLine": {
"ColorStop": COLOR_STOPS1, # can be more than 2
"Extend": "pad", # pad, repeat, reflect
},
"x0": x+50, # Offset into middle of pixel and middle of canvas
"y0": y+50,
"r0": 1,
"x1": x+50,
"y1": y+50,
"r1": s+1,
}
r2 = {
"Format": ot.PaintFormat.PaintRadialGradient,
"ColorLine": {
"ColorStop": COLOR_STOPS2, # can be more than 2
"Extend": "pad", # pad, repeat, reflect
},
"x0": x+50, # Offset into middle of pixel
"y0": y+50,
"r0": 1,
"x1": x+50,
"y1": y+50,
"r1": s+1,
}
layers.append(r1)
return layers[0] # @@@@@ This should be changed
return (ot.PaintFormat.PaintColrLayers, layers)
The text was updated successfully, but these errors were encountered:
How to draw multiple shapes in one layer? (See the current code below. Now multiple shapes are drawn in that layer, but the does not seem to work. Only returning if one is returned.)
def getPaintRadialGradient1(s, x, y):
layers = []
r1 = {
"Format": ot.PaintFormat.PaintRadialGradient,
"ColorLine": {
"ColorStop": COLOR_STOPS1, # can be more than 2
"Extend": "pad", # pad, repeat, reflect
},
"x0": x+50, # Offset into middle of pixel and middle of canvas
"y0": y+50,
"r0": 1,
"x1": x+50,
"y1": y+50,
"r1": s+1,
}
r2 = {
"Format": ot.PaintFormat.PaintRadialGradient,
"ColorLine": {
"ColorStop": COLOR_STOPS2, # can be more than 2
"Extend": "pad", # pad, repeat, reflect
},
"x0": x+50, # Offset into middle of pixel
"y0": y+50,
"r0": 1,
"x1": x+50,
"y1": y+50,
"r1": s+1,
}
layers.append(r1)
return layers[0] # @@@@@ This should be changed
return (ot.PaintFormat.PaintColrLayers, layers)
The text was updated successfully, but these errors were encountered: