Template Keywords

Drawing - grid

The /grid/ keyword draws a grid of lines with a fixed number of rows and columns. The lines of the grid are drawn with the current pen.

/grid/,<left>,<top>,<right>,<bottom>,<columns>,<rows>

The left and top values specify the top left corner, and the right and bottom the bottom right corner of the frame.

The columns is the number of columns in the grid. Each column has the same width.

The rows is the number of rows in the grid. Each row has the same height.

Examples

This draws a grid to be used as a background for a table of results with three columns for a result, grade, and position. It has eight rows for eight subjects. The width of the frame is 45 mm so each column is drawn 15 mm wide. The height of the frame is 80 mm so each row is 10 mm high.

/grid/,100,500,550,1300,3,8

This combines more than one /grid/ to create a single table one wide column for the course, four narrow columns for results and another wide column for comments.

/grid/,100,500,600,1300,1,6
/grid/,600,500,1000,1300,4,6
/grid/,1000,500,1800,1300,1,6

The /grid/ keyword is a compact way of specifying groups of adjacent rectangles.

 

Contents
Search