0

I need help in finding good tutorials on how to manually code a vector drawable like the one below. I have tried surfing the net but I haven't found any good information.

<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24dp"
    android:height="24dp"
    android:viewportWidth="24.0"
    android:viewportHeight="24.0">
<path
    android:pathData="M12,14c1.66,0 2.99,-1.34 2.99,-3L15,5c0,-1.66 -1.34,-3 -3,-3S9,3.34 9,5v6c0,1.66 1.34,3 3,3zM17.3,11c0,3 -2.54,5.1 -5.3,5.1S6.7,14 6.7,11L5,11c0,3.41 2.72,6.23 6,6.72L11,21h2v-3.28c3.28,-0.48 6,-3.3 6,-6.72h-1.7z"
    android:fillColor="#000000"/>
Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Terre
  • 29
  • 9
  • Does this answer your question? [Create VectorDrawable from String (path)?](https://stackoverflow.com/questions/33312157/create-vectordrawable-from-string-path) – ADM Jan 05 '21 at 07:48
  • Thanks @ADM but wanted to understand what really happens like the meaning of letters and numbers on pathData so that I can make app that creates vector drawables – Terre Jan 05 '21 at 07:54
  • [here](https://developer.mozilla.org/de/docs/Web/SVG/Tutorial/Pfade) is good tutorial for making path. – anatoli Jan 06 '21 at 09:27

1 Answers1

-1

There are five line commands for nodes. The first command is the "Move To" or M, which was described above. It takes two parameters, a coordinate (x) and coordinate (y) to move to. If the cursor was already somewhere on the page, no line is drawn to connect the two positions. The "Move To" command appears at the beginning of paths to specify where the drawing should start. For example:

M x y (or) m dx dy

<svg width="200" height="200" xmlns="http://www.w3.org/2000/svg">

<path d="M10 10"/>

<!-- Points -->
<circle cx="10" cy="10" r="2" fill="red"/>

</svg>

There are three commands that draw lines. The most generic is the "Line To" command, called with L. L takes two parameters—x and y coordinates—and draws a line from the current position to a new position.

L x y (or) l dx dy

link

belmel ahmed
  • 176
  • 1
  • 5