harjot-oberai / harjot-oberai/VectorMaster

Multiply path scale problem

Open
#14 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.6k
Forks
165
PR merge metrics
No merged PRs in 30d

Description

Hi, I have a vector image (**vector_img.xml**):

```

```

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:

![from](https://user-images.githubusercontent.com/5021616/39512987-9c9bd0b4-4e14-11e8-8a51-073566ccafd1.png)

Perhaps the problem is that when we scale vector we can't set pivot points? Or am I doing something wrong?)

Thanks

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with VectorMasterDrawable and the vector_img.xml example, reproduce the result using setScaleX(1.5f) and setScaleY(1.5f), and inspect how scaling is applied. Done means identifying why the scaled vector renders incorrectly and confirming the expected result for this Android vector drawable.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.