Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/200.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用Android矢量图形绘制半椭圆形_Android_Geometry_Oval - Fatal编程技术网

如何使用Android矢量图形绘制半椭圆形

如何使用Android矢量图形绘制半椭圆形,android,geometry,oval,Android,Geometry,Oval,我试着做一个半椭圆形。我做了,但它是相反的。我想做一个像这样的椭圆形 我试过这个密码 <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="10dp" android:viewportWidth="24.0" android:viewportHeight="24.0"> <

我试着做一个半椭圆形。我做了,但它是相反的。我想做一个像这样的椭圆形

我试过这个密码

<vector 

    xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24dp"
    android:height="10dp"
    android:viewportWidth="24.0"
    android:viewportHeight="24.0">

    <path
        android:pathData="M0 -5.4a13 7 0 1 0 24 0V24H0z"
        android:fillColor="@color/white"/>

</vector>

我从stackverflow那里收集了这段代码。但是有一个向量,我不能完全理解它。

试试下面的代码:

 <vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24dp"
    android:height="24dp"
    android:viewportHeight="24.0"
    android:viewportWidth="24.0">

<path
    android:name="circle"
    android:fillColor="#fff"
    android:pathData="M12,38m-10,0a10,10 0,1 1,20 0a10,10 0,1 1,-20 0" />

</vector>

尝试以下代码:

 <vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24dp"
    android:height="24dp"
    android:viewportHeight="24.0"
    android:viewportWidth="24.0">

<path
    android:name="circle"
    android:fillColor="#fff"
    android:pathData="M12,38m-10,0a10,10 0,1 1,20 0a10,10 0,1 1,-20 0" />

</vector>


您提供的图像是蓝色椭圆的上半部分。你真正想要的图像是什么?你想要的是蓝色椭圆的上半部分,而你得到的是其他什么?你提供的图像是蓝色椭圆的上半部分。你真正想要的图像是什么?你想要的是蓝色椭圆的上半部分,而你得到的是别的什么?