How to make the canvas not square?

26 views Asked by At

I have a vector image in my android app:

<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="800dp"
    android:height="800dp"
    android:viewportWidth="21"
    android:viewportHeight="21">
  <path
      android:strokeWidth="1"
      android:pathData="m4.5,7.5h12"
      android:strokeLineJoin="round"
      android:fillColor="#00000000"
      android:fillType="evenOdd"
      android:strokeColor="#000000"
      android:strokeLineCap="round"/>
  <path
      android:strokeWidth="1"
      android:pathData="m4.498,10.5h11.997"
      android:strokeLineJoin="round"
      android:fillColor="#00000000"
      android:fillType="evenOdd"
      android:strokeColor="#000000"
      android:strokeLineCap="round"/>
  <path
      android:strokeWidth="1"
      android:pathData="m4.5,13.5h11.995"
      android:strokeLineJoin="round"
      android:fillColor="#00000000"
      android:fillType="evenOdd"
      android:strokeColor="#000000"
      android:strokeLineCap="round"/>
</vector>

enter image description here

I want to make the canvas look like the following:

enter image description here

Decreasing viewportWidth makes the icon get shifted on the right side. Changing width also doesn't change the canvas size.

So is there any way to trim the canvas on the sides?

0

There are 0 answers