I'm trying to build a simple drawing app on Android and I was wondering if anyone has a direction how to add the following elements:
- A wavy simple line (Like this).
- A simple arrow.
- A dotted arrow.
- An arrow like a "T".
Thanks!
I'm trying to build a simple drawing app on Android and I was wondering if anyone has a direction how to add the following elements:
Thanks!
Take a look here for arrowheads:
For simple lines:
PathEffect myPathEffect = new PathEffect();
paint.setPathEffect(myPathEffect);
Read documentation here.
Given your sample, however, I'm thinking you're going to have to construct paths point by point. Whatever the effect you're trying to achieve, you're going to have to do a bit of mathematics to plot your line. The example of a wavy line that you provided is anything but "simple" given its irregularity.