mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-10 13:02:59 +00:00
adjust MILB logos to be slightly smaller and more visible
This commit is contained in:
@@ -139,9 +139,9 @@ class BaseMiLBManager:
|
||||
height = self.display_manager.matrix.height
|
||||
image = Image.new('RGB', (width, height), color=(0, 0, 0))
|
||||
|
||||
# Make logos 150% of display dimensions to allow them to extend off screen
|
||||
max_width = int(width * 1.5)
|
||||
max_height = int(height * 1.5)
|
||||
# Make logos 120% of display dimensions to allow them to extend off screen
|
||||
max_width = int(width * 1.2)
|
||||
max_height = int(height * 1.2)
|
||||
|
||||
# Load team logos
|
||||
away_logo = self._get_team_logo(game_data['away_team'])
|
||||
@@ -160,14 +160,14 @@ class BaseMiLBManager:
|
||||
|
||||
# Position logos with their centers at the screen edges
|
||||
# Home team logo (right edge)
|
||||
home_x = width - (home_logo.width // 2)
|
||||
home_x = width - (home_logo.width * 5 // 8)
|
||||
home_y = center_y - (home_logo.height // 2)
|
||||
|
||||
# Paste the home logo onto the overlay
|
||||
overlay.paste(home_logo, (home_x, home_y), home_logo)
|
||||
|
||||
# Away team logo (left edge)
|
||||
away_x = -(away_logo.width // 2)
|
||||
away_x = -(away_logo.width * 3 // 8)
|
||||
away_y = center_y - (away_logo.height // 2)
|
||||
|
||||
overlay.paste(away_logo, (away_x, away_y), away_logo)
|
||||
@@ -574,9 +574,9 @@ class MiLBLiveManager(BaseMiLBManager):
|
||||
height = self.display_manager.matrix.height
|
||||
image = Image.new('RGB', (width, height), color=(0, 0, 0))
|
||||
|
||||
# Make logos 150% of display dimensions to allow them to extend off screen
|
||||
max_width = int(width * 1.5)
|
||||
max_height = int(height * 1.5)
|
||||
# Make logos 120% of display dimensions to allow them to extend off screen
|
||||
max_width = int(width * 1.2)
|
||||
max_height = int(height * 1.2)
|
||||
|
||||
# Load and place team logos
|
||||
away_logo = self._get_team_logo(game_data['away_team'])
|
||||
@@ -595,14 +595,14 @@ class MiLBLiveManager(BaseMiLBManager):
|
||||
|
||||
# Position logos with their centers at the screen edges
|
||||
# Home team logo (right edge)
|
||||
home_x = width - (home_logo.width // 2)
|
||||
home_x = width - (home_logo.width * 5 // 8)
|
||||
home_y = center_y - (home_logo.height // 2)
|
||||
|
||||
# Paste the home logo onto the overlay
|
||||
overlay.paste(home_logo, (home_x, home_y), home_logo)
|
||||
|
||||
# Away team logo (left edge)
|
||||
away_x = -(away_logo.width // 2)
|
||||
away_x = -(away_logo.width * 3 // 8)
|
||||
away_y = center_y - (away_logo.height // 2)
|
||||
|
||||
overlay.paste(away_logo, (away_x, away_y), away_logo)
|
||||
|
||||
Reference in New Issue
Block a user