We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, I have a vector image (vector_img.xml):
<?xml version="1.0" encoding="utf-8"?> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="22dp" android:height="22dp" android:viewportWidth="300" android:viewportHeight="300"> <path android:fillColor="#FF000000" android:pathData="M 150 0 C 232.842712475 0 300 67.1572875254 300 150 C 300 232.842712475 232.842712475 300 150 300 C 67.1572875254 300 0 232.842712475 0 150 C 0 67.1572875254 67.1572875254 0 150 0 Z" /> <path android:fillColor="#FFFFFFFF" android:pathData="M 150 30 C 216.27416998 30 270 83.7258300203 270 150 C 270 216.27416998 216.27416998 270 150 270 C 83.7258300203 270 30 216.27416998 30 150 C 30 83.7258300203 83.7258300203 30 150 30 Z" /> <path android:fillColor="#FF000000" android:pathData="M 150 60 C 199.705627485 60 240 100.294372515 240 150 C 240 199.705627485 199.705627485 240 150 240 C 100.294372515 240 60 199.705627485 60 150 C 60 100.294372515 100.294372515 60 150 60 Z" /> </vector>
I'm trying to scale vector programmatically like this:
VectorMasterDrawable vectorDrawable = new VectorMasterDrawable(context, R.drawable.vector_img); vectorDrawable.setScaleX(1.5f); vectorDrawable.setScaleY(1.5f);
The result is not happy:
Perhaps the problem is that when we scale vector we can't set pivot points? Or am I doing something wrong?)
Thanks
The text was updated successfully, but these errors were encountered:
Yes, the problem is with the pivot points being at the top left corner by default.
I will implement another scale method which takes pivot points as arguments along with the scale factor.
Thanks for opening the issue.
Sorry, something went wrong.
No branches or pull requests
Hi, I have a vector image (vector_img.xml):
I'm trying to scale vector programmatically like this:
The result is not happy:
Perhaps the problem is that when we scale vector we can't set pivot points? Or am I doing something wrong?)
Thanks
The text was updated successfully, but these errors were encountered: