fix: enhance SVG initialization and scaling in card rendering#56
Merged
fix: enhance SVG initialization and scaling in card rendering#56
Conversation
Owner
joe-sharp
commented
Aug 24, 2025
- 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.
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.