Skip to content

Conversation

@Ninjananas
Copy link
Contributor

@Ninjananas Ninjananas commented Oct 28, 2024

Motivation

Hi Andy!

First of all, I'd like to thank you for Squib, it's a great tool that has been a HUGE help in my board game project.

As some people have pointed before in #356 and #238 for example, having more flexible ways to position images would be super cool, and I too need it for my project.

I have not implemented all the ideas in #238, I have only added an anchor: argument to the ScaleBox (which is used by the svg and png dsl methods).

rotated_anchors

I made sure that my changes are retro-compatible. Existing codebases should not be affected at all by these changes if they don't use the new features.

I have...

  • Written a sample in _samples?
    In fact I updated the samples/images/_images.rb sample to add an example of images rotating around different anchors
  • Updated documentation in the docs/ folder?
  • Linked this PR to an issue?
  • Written any automated tests?
    I have written basic unit tests to check the anchor: argument validation
  • Refactored your code to be maintainable?
    I tried to make minimal changes and follow the original programming style of the project, but I don't have much experience in Ruby so if you have any suggestions I'm eager to hear them!

I have not...

  • Written extensive tests, as I don't know how to write tests that check that the rendering is correct (I manually tested using sanity though)
  • Implemented anchor: for text or other methods. (I updated the ScaleBox class which is only used by svg and png)

@Autoquark
Copy link

Sorry to bump but I've been really missing this feature - is there any reason this can't be merged?

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