boost::gil::midpoint_ellipse_rasterizer

Performs ellipse rasterization using midpoint algorithm. Initially, program considers origin as center of ellipse and obtains first quadrant trajectory points. After that, it shifts origin to provided co‐ordinates of center and then draws the curve.

Synopsis

struct midpoint_ellipse_rasterizer;

Type Aliases

Name

type

Member Functions

Name

Description

midpoint_ellipse_rasterizer [constructor]

Creates a midpoint ellipse rasterizer

draw_curve

Fills pixels returned by function 'obtain_trajectory' as well as pixels obtained from their reflection along major axis, minor axis and line passing through center with slope ‐1 using colours provided by user.

obtain_trajectory

Returns a vector containing co‐ordinates of first quadrant points which lie on rasterizer trajectory of the ellipse.

operator()

Calls the function 'obtain_trajectory' and then passes obtained trajectory points in the function 'draw_curve' for drawing the desired ellipse.

Data Members

Name

center

semi_axes

Created with MrDocs