Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to draw grid lines with libgdx

Tags:

java

libgdx

It's little embarrassing to ask this question. But I can't figure out a way to draw 3 x 3 grid in the screen with libgdx. Can any of you help me?

like image 287
Tae-Sung Shin Avatar asked Jan 02 '12 21:01

Tae-Sung Shin


People also ask

How do you draw a grid line?

To draw this grid, put your ruler at the top of the paper, and make a small mark at every inch. Place the ruler at the bottom of the paper and do the same thing. Then use the ruler to make a straight line connecting each dot at the bottom with its partner at the top.

How can I add a grid to a picture?

To add grid to photo on Android, you can try Drawing Grid Maker. After opening a picture on it, you need to set the number of rows and columns, the color of the grid, and the line width. And if you're an iPhone user, the best tool is Grid # - Add grid on image.

When using a grid to draw a portrait How far apart should the lines be?

Begin drawing grid lines vertically and horizontally as shown in the example. The size of the image will depend on the distance between the lines (the larger the image, the wider the distance should be). In this image, my lines are a 1/2 inch apart. You should draw the lines a 1/2 inch to 1 inch apart.


1 Answers

You can use ShapeRenderer.

Or create meshes for the lines using someMesh.render(GL10.GL_LINE_STRIP)

like image 63
Neilos Avatar answered Sep 27 '22 20:09

Neilos