Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local transformations and high-level function capable of simplifying some tasks #163

Open
rossanoparis opened this issue Apr 9, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request question Further information is requested

Comments

@rossanoparis
Copy link

rossanoparis commented Apr 9, 2024

I noticed a commit [ Add getBBox and getLocalTransform ]

Which mentions local and absolute transformations, transformations stand for rotation scale and so on?
How it works?

Another inquiry I'd like to address pertains to the attached object, which serves as an example of what I mean.
Could you suggest an easy method, or perhaps implement a feature in your library capable of changing the primary color to another?

For instance, the main color of the attached object is currently green.
However, if I wish to change it to red, the process becomes complex, requiring digging into the SVG structure to locate and modify relevant IDs.
While this is not necessarily a problem, it would be advantageous to have a high-level function capable of simplifying this task

attached object
glossy-green-button.zip

@sammycage sammycage added documentation Improvements or additions to documentation enhancement New feature or request question Further information is requested labels Apr 9, 2024
@sammycage
Copy link
Owner

After examining the attached file, I found out that the "main color" is not a solid color; rather, it is a gradient consisting of multiple stops across multiple elements. Similarly, the transform matrix is complex and will be very difficult to change with just one line of code. If you wish to manipulate SVG, it is essential to study the file carefully. It would be better if the file were made by hand.

@sammycage
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants