Namespace: ContextManager

ContextManager

Drawing Context Manager Handles canvas context state management using functional composition
Source:

Methods

(static) withContext(drawFn) → {function}

Executes a drawing operation with saved context state
Parameters:
Name Type Description
drawFn function Drawing function to execute
Source:
Returns:
Type
function

(static) withRotation(angle, x, y) → {function}

Applies a rotation transformation around a point
Parameters:
Name Type Description
angle number Rotation angle in radians
x number Center X coordinate
y number Center Y coordinate
Source:
Returns:
Type
function

(static) withTranslation(x, y) → {function}

Applies a translation transformation
Parameters:
Name Type Description
x number X translation
y number Y translation
Source:
Returns:
Type
function