Implements the glyph rasterizer for the FreeType library.

Copyright 1996 David Turner, Robert Wilhelm and Werner Lemberg.

TTRaster.pas is part of the FreeType project, and may only be used modified and distributed under the terms of the FreeType project license, LICENSE.TXT. By continuing to use, modify or distribute this file you indicate that you have read the license and understand and accept it fully.

This version supports the following:

- direct grayscaling
- sub-banding
- drop-out modes 4 and 5
- second pass for complete drop-out control (bitmap only)
- variable precision

Re-entrancy is _not_ planned.

Changes between 1.1 and 1.2:

- no more trace tables, now uses linked list to sort coordinates
- reduced code size using function dispatch within a generic draw_sweep function
- added variable precision for finer rendering at small ppems

The interface in the unit may change in the future.
Fractional bits of Raster coordinates.
Bezier subdivision minimal step.
Shift used to convert coordinates.
Integer truncation mask.
Profiles buffer a.k.a. Render Pool.
Description of target map.
Target bitmap buffer.
Target pixmap buffer.
Current offset in target bitmap.
Increment to the next line in the target bitmap.
Current offset in the target pixmap.
Increment to the next line in the target pixmap.
Current min x during gray rendering.
Current max x during gray rendering.
Sweep initialization.
Span drawing.
Drop out control.
Sweep line step.
Direct rendering.
Current flags array.
Current endpoints array.
Current number of contours.
Current drop-out control mode.
Gray palette used during gray-levels rendering.
0: background .. 4: foreground
Temporary bitmap for grayscale.
Increment for the temporary bitmap.
Ending offset of the temporary bitmap.
Current capacity of the temporary bitmap.

Indicates whether a horizontal pass should be performed to control drop-out accurately when calling Render_Glyph. Note: There is no horizontal pass during gray render.

Should be set to False when ppem >= 18.

Render one glyph in the target bitmap (1-bit per pixel).
Render one gray-level glyph in the target pixmap.

Palette points to an array of 5 colors used for the rendering. Use Nil to reuse the last palette. The default is VGA graylevels.

These functions round up minimum and maximum value of an interval over data which is organized by grains of constant size. For example, if the size of the grain is 4, then minimum values can be 0, 4, 8, etc. And maximum values can be 3, 7, 11, etc.

These functions round up minimum and maximum value of an interval over data which is organized by grains of constant size. For example, if the size of the grain is 4, then minimum values can be 0, 4, 8, etc. And maximum values can be 3, 7, 11, etc.