Skip to content

Documentation / @ripl/terminal / rasterizeEllipse

Function: rasterizeEllipse() ​

rasterizeEllipse(cx, cy, rx, ry, rotation, startAngle, endAngle, counterclockwise, plot): void

Defined in: terminal/src/algorithms.ts:480

Rasterizes an ellipse outline at (cx,cy), honoring rotation and sweep.

Parameters ​

ParameterTypeDescription
cxnumberX coordinate of the ellipse center.
cynumberY coordinate of the ellipse center.
rxnumberRadius along the ellipse's own x axis.
rynumberRadius along the ellipse's own y axis.
rotationnumberRotation of the ellipse about its center, in radians.
startAnglenumberAngle the sweep starts at, in radians.
endAnglenumberAngle the sweep ends at, in radians.
counterclockwisebooleanWhether the sweep runs counterclockwise.
plotPixelCallbackInvoked for each rasterized pixel.

Returns ​

void