06-04-2022, 02:00 PM
My only criticism of this is that the anti-aliasing button is in fact a blur button. Literally speaking, this is the algorithm for blur, not anti-alias:
p1~& = POINT(x, y)
p2~& = POINT(x + 1, y)
p3~& = POINT(x, y + 1)
p4~& = POINT(x + 1, y + 1)
p5~& = POINT(x - 1, y)
p6~& = POINT(x, y - 1)
p7~& = POINT(x - 1, y - 1)
p8~& = POINT(x - 1, y + 1)
p9~& = POINT(x + 1, y - 1)
r = _RED32(p1~&) + _RED32(p2~&) + _RED32(p3~&) + _RED32(p4~&) + _RED32(p5~&) + _RED32(p6~&) + _RED32(p7~&) + _RED32(p8~&) + _RED32(p9~&)
g = _GREEN32(p1~&) + _GREEN32(p2~&) + _GREEN32(p3~&) + _GREEN32(p4~&) + _GREEN32(p5~&) + _GREEN32(p6~&) + _GREEN32(p7~&) + _GREEN32(p8~&) + _GREEN32(p9~&)
b = _BLUE32(p1~&) + _BLUE32(p2~&) + _BLUE32(p3~&) + _BLUE32(p4~&) + _BLUE32(p5~&) + _BLUE32(p6~&) + _BLUE32(p7~&) + _BLUE32(p8~&) + _BLUE32(p9~&)
PSET (x, y), _RGB(r / 9, g / 9, b / 9)
p1~& = POINT(x, y)
p2~& = POINT(x + 1, y)
p3~& = POINT(x, y + 1)
p4~& = POINT(x + 1, y + 1)
p5~& = POINT(x - 1, y)
p6~& = POINT(x, y - 1)
p7~& = POINT(x - 1, y - 1)
p8~& = POINT(x - 1, y + 1)
p9~& = POINT(x + 1, y - 1)
r = _RED32(p1~&) + _RED32(p2~&) + _RED32(p3~&) + _RED32(p4~&) + _RED32(p5~&) + _RED32(p6~&) + _RED32(p7~&) + _RED32(p8~&) + _RED32(p9~&)
g = _GREEN32(p1~&) + _GREEN32(p2~&) + _GREEN32(p3~&) + _GREEN32(p4~&) + _GREEN32(p5~&) + _GREEN32(p6~&) + _GREEN32(p7~&) + _GREEN32(p8~&) + _GREEN32(p9~&)
b = _BLUE32(p1~&) + _BLUE32(p2~&) + _BLUE32(p3~&) + _BLUE32(p4~&) + _BLUE32(p5~&) + _BLUE32(p6~&) + _BLUE32(p7~&) + _BLUE32(p8~&) + _BLUE32(p9~&)
PSET (x, y), _RGB(r / 9, g / 9, b / 9)