Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more shapes on the layers #4

Open
petrvanblokland opened this issue Jun 4, 2023 · 0 comments
Open

more shapes on the layers #4

petrvanblokland opened this issue Jun 4, 2023 · 0 comments
Assignees

Comments

@petrvanblokland
Copy link
Owner

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)

@petrvanblokland petrvanblokland self-assigned this Jun 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant