<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
...
vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="
M0,0
L24,24
H0
V0
H24
V24
M0,24
L24,0
M0,12
H24
M12,0
V24
M0,6
H24
M0,18
H24
M6,0
V24
M18,0
V24
"
android:strokeWidth="0.05"
android:strokeColor="@android:color/black" />
vector>
这里绘制这个网格是有意义的,有助于我们理解椭圆的绘制
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="
M0,0 L24,24 H0 V0 H24 V24 M0,24 L24,0
M0,12 H24
M12,0 V24
M0,6 H24
M0,18 H24
M6,0 V24
M18,0 V24
"
android:strokeWidth="0.05"
android:strokeColor="@android:color/black" />
<path
android:pathData="
M12,6
A6,6 0 1 1 6,12
"
android:strokeWidth="0.5"
android:strokeColor="@android:color/white" />
<path
android:pathData="
M12,6
A6,6 0 0 1 6,12
"
android:strokeWidth="0.5"
android:strokeColor="@android:color/holo_red_dark" />
<path
android:pathData="
M12,6
A6,6 0 0 0 6,12
"
android:strokeWidth="0.5"
android:strokeColor="@android:color/holo_blue_dark" />
<path
android:pathData="
M12,6
A6,6 0 1 0 6,12
"
android:strokeWidth="0.5"
android:strokeColor="@android:color/holo_green_dark" />
vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="
M0,0 L24,24 H0 V0 H24 V24 M0,24 L24,0
M0,12 H24
M12,0 V24
M0,6 H24
M0,18 H24
M6,0 V24
M18,0 V24
"
android:strokeWidth="0.05"
android:strokeColor="@android:color/black" />
<path
android:pathData="
M18,12
A6,6 0 1 0 6,12
A6,6 0 1 0 18,12
"
android:strokeWidth="0.5"
android:strokeColor="@android:color/white" />
vector>
Q1,1 2,2
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="20dp"
android:height="10dp"
android:tint="#417FF9"
android:viewportWidth="20"
android:viewportHeight="10">
<path
android:fillColor="@android:color/white"
android:pathData="
M1,0
Q0,0 0,1
V8
Q0,9 1,9
L19,9
Q20,9 20,8
V1
Q20,0 19,0
M9.5,9
H10.5
L10,10
z" />
vector>
C0,0 1,1 2,2