Buffers allow a pixel or group of pixels to "grow" out in all directions.
Buffers can be accomplished two ways: the 'rook's case' and 'queen's case'.
The difference between the two is most obvious if you perform a one pixel buffer of a single pixel.
Note how the pixels buffered correspond to the moves made by a rook or queen
in chess. Here's how they work:
Rook's Case: A 'rook's' buffer includes all cells that are within the buffer distance.
For e.g., with a buffer of 4, a cell 4.2 pixel-widths away from the cell being buffered is ignored.
Queen's Case: In the queen's case the distance value is rounded down to the nearest integer.
The pixel 4.2 units away is now considered to be within the buffer. However, 5.2 would be too far.
How do I work this?