【问题标题】:How to make stroke with rounded corners?如何用圆角画笔画?
【发布时间】:2021-07-10 10:59:10
【问题描述】:

这是我当前的代码:

    <vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="400px"
    android:height="400px"
    android:viewportWidth="400.0"
    android:viewportHeight="400.0">
<path
android:strokeColor="#000000"
android:strokeWidth="4"
android:pathData="M100, 100, l100, 100, l100, -100 "/>
</vector>

它看起来像this。 我怎样才能使它像this一样圆润的开始和结束笔画?

【问题讨论】:

    标签: xml android-studio vector


    【解决方案1】:

    你可以用它来做圆角

    <vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="512dp"
        android:height="512dp"
        android:viewportWidth="512"
        android:viewportHeight="512">
      <path
          android:pathData="M27.7,111.1c-10.3,2.4 -19.7,10.3 -24.4,20.4 -2.3,5.1 -2.8,7.3 -2.7,14.5 0,16 -9.6,5.2 119.2,134.2 77.7,77.8 116,115.5 119.1,117.2 7.3,3.9 15.8,5.3 23.4,3.7 3.4,-0.7 8.3,-2.4 10.8,-3.7 3.1,-1.7 41.4,-39.4 119.1,-117.2 128.8,-129 119.2,-118.2 119.2,-134.2 0,-7.2 -0.4,-9.4 -2.8,-14.7 -8.4,-18.4 -30.8,-26.2 -49.1,-17.1 -2.6,1.3 -38.8,36.8 -103.7,101.6l-99.8,99.7 -99.8,-99.7c-65.2,-65.1 -101.1,-100.3 -103.7,-101.6 -7.6,-3.7 -17,-4.9 -24.8,-3.1z"
          android:fillColor="#000000"
          android:strokeColor="#00000000"/>
    </vector>
    

    【讨论】:

      猜你喜欢
      • 2020-12-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-03-16
      • 1970-01-01
      相关资源
      最近更新 更多