Module: buffer

Methods

(inner) flipBufferHorizontally(buffer) → {external:canvas}

Make a horizonally-flipped copy of a buffer or image.
Parameters:
Name Type Description
buffer external:canvas | external:image The original image
Source:
Returns:
The flipped buffer
Type
external:canvas

(inner) flipBufferVertically(buffer) → {external:canvas}

Make a vertically-flipped copy of a buffer or image.
Parameters:
Name Type Description
buffer external:canvas | external:image The original image
Source:
Returns:
The flipped buffer
Type
external:canvas

(inner) makeBuffer(width, height, drawFun) → {external:canvas}

Make an invisible canvas buffer, and draw on it.
Parameters:
Name Type Description
width number The width of the buffer
height number The height of the buffer
drawFun drawCallback The callback that draws on the buffer
Source:
Returns:
The drawn buffer
Type
external:canvas

(inner) rotateClockwise(buffer) → {external:canvas}

Make a copy of a buffer that is rotated 90 degrees clockwise.
Parameters:
Name Type Description
buffer external:canvas | external:image The original image
Source:
Returns:
The rotated buffer
Type
external:canvas

(inner) rotateCounterclockwise(buffer) → {external:canvas}

Make a copy of a buffer that is rotated 90 degrees counterclockwise.
Parameters:
Name Type Description
buffer external:canvas | external:image The original image
Source:
Returns:
The rotated buffer
Type
external:canvas