Given a piece of ascii art and a factor to enlarge it by, which will always be an odd number >1, replace each character with the corresponding ascii-art, resized to fit on a grid the size of the input number:
| Character | What to do |
|---|---|
\ | A line of \ to the length of the enlarging factor, padded to form a line. |
/ | A line of / to the length of the enlarging factor, padded to form a line. |
| | A line of | to the length of the enlarging factor, centred horizontally. |
- | A line of - to the length of the enlarging factor, centered vertically. |
_ | A line of _ to the length of the enlarging factor, at the bottom of the square it's in. |
And of course, a space should be resized to a n-by-n grid of spaces. The input will only contain these six characters, plus newlines.
You may take input as a list of lines, a matrix of characters, whatever.
This is a bit confusing, so here's an example:
-\ /, 3 => \ --- \ \ / / / Because each character is enlarged to size 3.
Any trailing whitespace is allowed.
Scoring
This is code-golf, shortest wins!
Testcases
\, 3 => \ \ \ ---, 3 => --------- | | |, 3 => | | | | | | | | | |\_/| | | \_/ , 3 => | \ / | | \ / | | \___/ | | | | | | | \ / \ / \___/ _____ \ / / \ \___/, 3 => _______________ \ / \ / \ / / \ / \ / \ \ / \ / \_________/ /\ / \ /____\ || || _/__\_, 3 => /\ / \ / \ / \ / \ / \ / \ / \ / ____________ \ | | | | | | | | | | | | / \ / \ ___/ ______ \___ \/ \/, 5 => \ / \ / \ / \ / \/ \ / \ / \ / \ / \/ /-/ \-\, 7 => / / / / / / / ------- / / / / / / / \ \ \ \ \ \ \ ------- \ \ \ \ \ \ \ _ _ / \_/ \ | | | | |_| |_|, 11 => ___________ ___________ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \___________/ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ___________ | | ___________ | __ __ __ __ ___ /\ /\ | |\ | | / | | /\ | | / \/ \ | | \ | |-- | |--\ /__\ |-- | / \ | | \| |__ \__ | \ / \ | | , 5 => __________ __________ __________ __________ _______________ /\ /\ | | \ | | / | | /\ | | / \ / \ | | \ | | / | | / \ | | / \ / \ | | \ | | / | | / \ | | / \ / \ | | \ | | / | | / \ | | / \ / \ | | \ | | / | | / \ | | / \ / \ | | \ | | | | \ / \ | | / \ / \ | | \ | | | | \ / \ | | / \ / \ | | \ | | ---------- | | ---------- \ / \ | ---------- | / \ / \ | | \ | | | | \ / \ | | / \/ \ | | \ | | | | \ / __________ \ | | / \ | | \ | | \ | \ / \ | | / \ | | \ | | \ | \ / \ | | / \ | | \ | | \ | \ / \ | | / \ | | \ | | \ | \ / \ | | / \ | | \ | | __________ \__________ | \ / \ | |