This commit is contained in:
Patrick Morgan
2024-12-15 22:53:04 -08:00
parent a1f93b45e1
commit aa2b22b3f4
+10 -10
View File
@@ -348,17 +348,17 @@ class MaskContourProcessor:
joint='curve'
)
if 'decorativeElements' in effect_data:
for element in effect_data['decorativeElements']:
if element['type'] == 'circle':
pos = element['position']
radius = element['properties']['radius']
# if 'decorativeElements' in effect_data:
# for element in effect_data['decorativeElements']:
# if element['type'] == 'circle':
# pos = element['position']
# radius = element['properties']['radius']
bbox = [
(pos['x'] - radius, pos['y'] - radius),
(pos['x'] + radius, pos['y'] + radius)
]
draw.ellipse(bbox, fill=self.element_color)
# bbox = [
# (pos['x'] - radius, pos['y'] - radius),
# (pos['x'] + radius, pos['y'] + radius)
# ]
# draw.ellipse(bbox, fill=self.element_color)
canvas_np = np.array(canvas)
combined_mask = np.clip(mask_array + canvas_np, 0, 1)