Skip to main content
The Coding Wombat's user avatar
The Coding Wombat's user avatar
The Coding Wombat's user avatar
The Coding Wombat
  • Member for 9 years, 7 months
  • Last seen more than 1 year ago
revised
Loading…
revised
libGDX - Drawing polygon with texture gives weird lines
More clearly described the actual questions.
Loading…
revised
libGDX - Drawing polygon with texture gives weird lines
Added more clarification as to what I want
Loading…
comment
libGDX - Drawing polygon with texture gives weird lines
No, it does not really do what I require or asked for. It was helpful, but what I want is that the texture scales to the size of the hexagon and that it starts drawing the texture at the start of each hexagon. I'll edit my question. I already fixed the not starting to draw at each texture with my previous comment.
comment
libGDX - Drawing polygon with texture gives weird lines
I fixed my above concern by not adding the start position to every float in the vertices float[] but instead using sprite.setPosition(start.x, start.y).
comment
libGDX - Drawing polygon with texture gives weird lines
Okay, that looks prettier, but doesn't really do what I want. That makes the image repeat next to each other and under each other. But that means that each hexagon looks different (the texture repeats so on the second hexagon, the texture is already halfway on the first hexagon). I just want to start drawing the texture on the top left of each hexagon.
revised
Loading…
Loading…
accepted
comment
Image rendering with additional space around it
@Christer I cannot quite see that, is this a set number of pixels or a percentage of the width/height?
comment
Image rendering with additional space around it
@Christer I have also tried the 2nd method and that also works, I think it's better since I do not have to manually make images square.
awarded
accepted
comment
Image rendering with additional space around it
Thanks a lot, I decided to use the last option, if I have an image that is not square, I simply make it square. In game it will then be transformed to not be square anymore.
revised
Image rendering with additional space around it
I now have more than 10 reputation so I included the links
Loading…
awarded
Loading…
awarded
awarded