-
-
Notifications
You must be signed in to change notification settings - Fork 885
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
Mirror a shape with respect to custom axis #1689
Comments
Did you try anything? I don't think there is anything specific to the Konva. Just some math calculations. |
I was thinking if konva have inbuilt method for this just like scaleX or scaleY. If not, then i need to search for math calculations. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I went through the konva documentation regarding mirror a shape.
Currently i believe we can mirror a shape on x-axis or y-axis. In that case, it is mirrored with respect to 0,0 origin point.
Then i can use offset to mirror a shape from a custom origin point.
My requirement is bit different. Assume, there are n number of axis in 2d model. lets say one axis at every 5 degree angle from origin point. I want to mirror a shape from those axis. My mirror functionality should not be limited to x or y axis. if i can pass a angle, offset and shape, it should mirror the shape through that axis which will be drawn on that angle from origin.
Please see below image created, where i want to rotate the rectangle shape through purple axis.
The text was updated successfully, but these errors were encountered: