I am creating a skyline game as a side project for fun, and I was having trouble when I would get to texturing the walls of the buildings, I currently am just drawing a polygon to that area, but I want to know if there is a way to texture it such that a texture like this:
could be rendered like this:
Here is an image of the game, and the parts I want to texture are the gray walls of the buildings.
I know I can do this by creating a separate rendering system that draws it pixel by pixel, but I am trying to avoid that.
My specific question is if there exists methods in Java's Graphics or something similar that can accomplish this.



if you want to perform a shear transformation AffineTransformation is your solution.
use the AffineTransformation when draw image - sadly it's not so obvious that you have to use Graphics2D for that purpose