Skip to content

fix: enhance SVG initialization and scaling in card rendering#56

Merged
joe-sharp merged 1 commit intomainfrom
joe-sharp/ensure_viewbox
Aug 24, 2025
Merged

fix: enhance SVG initialization and scaling in card rendering#56
joe-sharp merged 1 commit intomainfrom
joe-sharp/ensure_viewbox

Conversation

@joe-sharp
Copy link
Owner

  • Updated the SVG initialization in the MtgCardMaker to include a viewBox for proper scaling.
  • Modified the sprite sheet builder to wrap card elements in an SVG tag with a viewBox for consistent rendering.

- Updated the SVG initialization in the MtgCardMaker to include a viewBox for proper scaling.
- Modified the sprite sheet builder to wrap card elements in an SVG tag with a viewBox for consistent rendering.
@joe-sharp joe-sharp self-assigned this Aug 24, 2025
@joe-sharp joe-sharp requested a review from Copilot August 24, 2025 23:42
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances SVG rendering and scaling in the MTG card maker by adding proper viewBox attributes to SVG elements. The changes ensure consistent scaling and rendering behavior across different contexts.

  • Added viewBox attribute to the main SVG initialization in MtgCardMaker
  • Wrapped individual card elements in sprite sheets with their own SVG containers including viewBox for proper scaling

Reviewed Changes

Copilot reviewed 2 out of 12 changed files in this pull request and generated no comments.

File Description
lib/mtg_card_maker.rb Added viewBox parameter to main SVG initialization for proper scaling
lib/mtg_card_maker/sprite_sheet_builder.rb Wrapped card elements in SVG containers with viewBox for consistent rendering in sprite sheets

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@joe-sharp joe-sharp merged commit 9ac5186 into main Aug 24, 2025
4 checks passed
@joe-sharp joe-sharp deleted the joe-sharp/ensure_viewbox branch August 24, 2025 23:44
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

Successfully merging this pull request may close these issues.

2 participants