'How to make a gradient vector image with an angle of 45
I need to degrade my vector images, but I don't know what to put in the X,Y values of the colors to make an angle of 45.
Can anyone help me please?
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="1440dp"
android:height="320dp"
android:viewportWidth="1440"
android:viewportHeight="320">
<path android:pathData="M0,96L24,96C48,96 96,96 144,106.7C192,117 240,139 288,170.7C336,203 384,245 432,234.7C480,224 528,160 576,160C624,160 672,224 720,250.7C768,277 816,267 864,256C912,245 960,235 1008,202.7C1056,171 1104,117 1152,106.7C1200,96 1248,128 1296,144C1344,160 1392,160 1416,160L1440,160L1440,0L1416,0C1392,0 1344,0 1296,0C1248,0 1200,0 1152,0C1104,0 1056,0 1008,0C960,0 912,0 864,0C816,0 768,0 720,0C672,0 624,0 576,0C528,0 480,0 432,0C384,0 336,0 288,0C240,0 192,0 144,0C96,0 48,0 24,0L0,0Z">
<aapt:attr name="android:fillColor">
<gradient
android:type="linear"
android:angle="45"
android:startColor="#fff"
android:startX=""
android:startY=""
android:endColor="#CDA3"
android:endX=""
android:endY=""/>
</aapt:attr>
</path>
</vector>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
