Common Lisp Package: NET.TUXEE.AA-BIN

README:

FUNCTION

Public

CELLS-SWEEP (STATE FUNCTION &OPTIONAL SPAN-FUNCTION)

Call FUNCTION for each pixel on the polygon path described by previous call to LINE or LINE-F. The pixels are scanned in increasing Y, then on increasing X. For optimization purpose, the optional FUNCTION-SPAN, if provided, is called for a full span of identical alpha pixel. If not provided, a call is made to FUNCTION for each pixel in the span.

LINE-F (STATE X1 Y1 X2 Y2)

Draw a line, whose coordinates are translated to fixed-point as expected by function LINE. This is a convenient function to not depend on +CELL-WIDTH+.

Undocumented

LINE (STATE X1 Y1 X2 Y2)

MAKE-STATE (&KEY ((CELLS DUM66) NIL))

Private

CELL-VALUE (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

CELL-X (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

CELL-Y (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

COMPARE-CELLS (A B)

Compare coordinates between 2 cells. Used to sort cells by Y, then by X.

STATE-CELLS (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

STATE-RESET (STATE)

Reset the state, losing all accumulated cells. It can be faster or less memory consuming to reset a state and reuse it, rather than creating a new state.

Undocumented

CELL-P (OBJECT)

SETFCELL-VALUE (NEW-VALUE INSTANCE)

SETFCELL-X (NEW-VALUE INSTANCE)

SETFCELL-Y (NEW-VALUE INSTANCE)

COPY-CELL (INSTANCE)

COPY-STATE (INSTANCE)

MAKE-CELL (&KEY ((X DUM26) NIL) ((Y DUM27) NIL) ((VALUE DUM28) 0))

MAP-LINE-INTERSECTIONS

SET-CURRENT-CELL (STATE X Y)

SETFSTATE-CELLS (NEW-VALUE INSTANCE)

STATE-P (OBJECT)

CLASS

Private

STATE

AA state. Hold all the cells generated when drawing lines.

Undocumented

CELL

CONSTANT

Private

+ALPHA-RANGE+

For non overlapping polygons, the alpha value will be in the range (-limit,limit) where limit is +alpha-range+. The value is negative or positive accordingly to the polygon orientation (clockwise or counter-clockwise.)

+CELL-WIDTH+

A cell represent a pixel square, and the width is the fractional part of the fixed-point coordinate. A large value increase precision. 256 should be enough though. Note that smaller value should NOT increase performance.