It's likely that anyone who used Twitter a couple of months ago would know about the 'Howdy! I'm the sheriff of X" meme. Where a simple image of a sheriff is drawn with emoji, and changes to fit a theme. So I thought it was time for the Sheriff of Code Golf. Here he is:
###
#####
###
###
###
#
#####
# # #
# # #
# # #
#
###
# #
# #
# #
# #
This one in particular has 'pixels' which are one character wide, and one character high. To generate him, the arguments will be 1 and 1.
What if he is to be wider than he is tall?
######
##########
######
######
######
##
##########
## ## ##
## ## ##
## ## ##
##
######
## ##
## ##
## ##
## ##
He's got a height of 1, but a width of 2.
Rules:
- The challenge is to write code to draw your own Sheriff of Code Golf, in the fewest characters possible.
- Use any programming language your heart desires.
- Your code should take two arguments, both of which are integers, for the height and width of the Sheriff.
- The output should be composed of single white spaces for the background, and any other character(s) you choose for the Sheriff. (I've used hashes for the test cases, but it doesn't matter what you use).
- It should be possible for the height to be a negative integer, inverting the image.
- The width can be a negative integer, but because the image is symmetrical, it will be identical to it's positive value.
- Trailing white-spaces are irrelevant.
- If either argument is 0, that dimension is 'flattened' to a single row or column. The length of this line is the other argument multiplied by the height, or width of the Sheriff, respectively.
- If both arguments are 0, both lines are 'flattened', leaving a single positive character.
- Not essential, but please include a link to an online interpreter such as tio.run
- The output should be a string, over multiple lines, or output to the console.
Test Cases
1 high, 1 wide
###
#####
###
###
###
#
#####
# # #
# # #
# # #
#
###
# #
# #
# #
# #
2 high, 1 wide
###
###
#####
#####
###
###
###
###
###
###
#
#
#####
#####
# # #
# # #
# # #
# # #
# # #
# # #
#
#
###
###
# #
# #
# #
# #
# #
# #
# #
# #
1 high, 2 wide
######
##########
######
######
######
##
##########
## ## ##
## ## ##
## ## ##
##
######
## ##
## ##
## ##
## ##
2 high, 2 wide
######
######
##########
##########
######
######
######
######
######
######
##
##
##########
##########
## ## ##
## ## ##
## ## ##
## ## ##
## ## ##
## ## ##
##
##
######
######
## ##
## ##
## ##
## ##
## ##
## ##
## ##
## ##
-1 high, 1 wide
# #
# #
# #
# #
###
#
# # #
# # #
# # #
#####
#
###
###
###
#####
###
1 high, -1 wide
###
#####
###
###
###
#
#####
# # #
# # #
# # #
#
###
# #
# #
# #
# #
0 high, 0 wide
#
1 high, 0 wide
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
0 high, 2 wide
##################
Have fun, y'all!