# Simplified canvas builtin

The golfing languages [05AB1E](https://github.com/Adriandmen/05AB1E/) and [Vyxal](https://github.com/Vyxal/Vyxal) have a "canvas" builtin that draws a string on a ASCII grid. In this challenge, you'll be implementing a simplified form of this.

You should take a string of ASCII characters, along with a list of directions as integers 0-7, where 0 is directly upwards and the rest continue clockwise - 1 is up-right, 2 is right, etc up to 7 being up-left.

```
7 0 1
 \|/
6-x-2
 /|\
5 4 3
```

For example, given the string `abcde` and the directions `0,2,5,6`:

Draw `a` at the center, then move up (0) and draw `b`:

```
b
a
```

Then move right (2) and draw `c`:

```
bc
a
```

Then move down-left (5) and draw `d`, overwriting the `a`:

```
bc
d
```

And finally move left (6) and draw `e`:

```
 bc
ed
```

For a more complex example that I won't work through, given the string `octagon!` and the directions `1,2,3,4,5,6,7`, you should draw:

```
 ct
o  a
!  g
 no
```

Empty space should be filled with spaces, and you can output with any amount of leading and trailing whitespace so long as the pattern at the centre is still correct. There will always be exactly one more character than directions, so that one character can be drawn at the centre.

You may take directions as 1-8 instead, and/or reorder them in any way. The input string may contain spaces.

This is [tag:code-golf], shortest wins!

## Testcases


| Input | Output |
| -------- | -------------- |
| `[1,1,1,1], "aaaaa"` | <pre><code>    a<br>   a <br>  a  <br> a   <br>a    </code></pre> |
| `[1,2,3,4,5,6,7],"octagon!"` | <pre><code> ct <br>o  a<br>!  g<br> no </code></pre> | 
| `[2,4,2,4,2,4,2,4],"staircase"` | <pre><code>st   <br> ai  <br>  rc <br>   as<br>    e</code></pre> | 
| `[1,1,1,1,1,1],"s s s s"` | <pre><code>      s<br>       <br>    s  <br>       <br>  s    <br>       <br>s      </code></pre> | 
| `[2,2,2,2,0,0,6,6,4,4], "overwriting"` | <pre><code>  iti<br>  n r<br>ovgrw</code></pre> |
| `[2,2,2,4,4,5,5,6,6,6,0,0,1,5,2,2,2,1,5,4], "+--+|+/+--+|X/+--X/+|"` | <pre><code>  +--+<br> /  /&#124;<br>+--+ +<br>&#124;  &#124;/ <br>+--+  </code></pre> |
| <pre><code>[6,7,0,1,2,2,3,3,4,4,5,5,6,6,6,7,7,7,0,0,0,1,1,1,2,2,2],<br>"spiralspiralspiralspiralspir"</code></pre> | <pre><code>   spir  <br>  l      <br> a       <br>r   als  <br>i  r   p <br>p  i    i<br>s   ps  r<br> l      a<br>  a    l <br>   rips  </code></pre> |

## Meta

Is this distinct enough from [Scribble Pad For Nerds](https://codegolf.stackexchange.com/q/248244/100664)?