Specifying pixel or character grid typeΒΆ

!chargrid

Declare pixel or character positioning


SYNTAX

!chargrid ON | OFF

This declaration tells the Sculptor compiler which type of grid to use.

!chargrid ON sets a character-based grid, based on the height and width of a screen character. This was the only positioning method available in earlier versions of Sculptor.

!chargrid OFF sets a pixel-based grid, which allows much greater accuracy in positioning windows and controls.

By default, !chargrid is OFF. However, the declaration !chargrid ON has been included in $SCULPTOR/include/local.h (which is itself included in $SCULPTOR/include/sculptor.h). This ensures that programs written in earlier versions of Sculptor compile as expected.

If converting to pixel positioning, do one of the following:

1

Remove the !chargrid ON declaration from local.h, and convert your programs to pixel positioning, adding the line !chargrid ON to any programs that remain unconverted.

2

Leave !chargrid ON in local.h, and add !chargrid OFF to any programs that are converted to pixel positioning, ensuring that the line is placed after:

!include <sculptor.h>

The positioning is vital because the compiler scc and the Sculptor program designer both honour the last !chargrid declaration that they encounter.


RELATED TOPICS

Pixel and character positioning

!include