mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 12:24:59 +00:00
style: Fix whitespace in 30k-image.py
This commit is contained in:
parent
9fa3636c57
commit
c6d4337855
1 changed files with 5 additions and 5 deletions
|
@ -47,7 +47,7 @@ def generate_confetti(count=150, width=DEFAULT_WIDTH, height=DEFAULT_HEIGHT):
|
|||
"""Generate SVG confetti elements for the celebration."""
|
||||
confetti = []
|
||||
colors = [AIDER_GREEN, AIDER_BLUE, GOLD_COLOR, "#e74c3c", "#9b59b6", "#3498db", "#2ecc71"]
|
||||
|
||||
|
||||
# Define text safe zone - centered area where text will be displayed
|
||||
safe_zone_x_min = width * 0.2
|
||||
safe_zone_x_max = width * 0.8
|
||||
|
@ -57,18 +57,18 @@ def generate_confetti(count=150, width=DEFAULT_WIDTH, height=DEFAULT_HEIGHT):
|
|||
# Keep trying until we have enough confetti pieces
|
||||
attempts = 0
|
||||
confetti_count = 0
|
||||
|
||||
|
||||
while confetti_count < count and attempts < count * 3:
|
||||
attempts += 1
|
||||
|
||||
|
||||
# Generate random position
|
||||
x = random.randint(0, width)
|
||||
y = random.randint(0, height)
|
||||
|
||||
|
||||
# Skip if the position is in the text safe zone
|
||||
if (safe_zone_x_min < x < safe_zone_x_max) and (safe_zone_y_min < y < safe_zone_y_max):
|
||||
continue
|
||||
|
||||
|
||||
confetti_count += 1
|
||||
size = random.randint(5, 15)
|
||||
color = random.choice(colors)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue