Module imageproc::drawing

source ·
Expand description

Helpers for drawing basic shapes on images.

Structs

Iterates over the coordinates in a line segment using Bresenham’s line drawing algorithm.
Iterates over the image pixels in a line segment using Bresenham’s line drawing algorithm.
Iterates over the image pixels in a line segment using Bresenham’s line drawing algorithm.
A 2D point.

Functions

Draws as much of the line segment between start and end as lies inside the image bounds. The parameters of blend are (line color, original color, line weight). Consider using interpolate for blend. Uses Xu’s line drawing algorithm.
Draws as much of the line segment between start and end as lies inside the image bounds. The parameters of blend are (line color, original color, line weight). Consider using interpolate for blend. Uses Xu’s line drawing algorithm.
Draws as much of a filled convex polygon as lies within image bounds. The provided list of points should be an open path, i.e. the first and last points must not be equal. An implicit edge is added from the last to the first point in the slice.
Draws as much of a filled convex polygon as lies within image bounds. The provided list of points should be an open path, i.e. the first and last points must not be equal. An implicit edge is added from the last to the first point in the slice.
Draws a colored cross on an image. Handles coordinates outside image bounds.
Draws a colored cross on an image in place. Handles coordinates outside image bounds.
Draws as much of a cubic bezier curve as lies within image bounds.
Draws as much of a cubic bezier curve as lies within image bounds.
Draw as much of a circle and its contents as lies inside the image bounds.
Draw as much of a circle, including its contents, as lies inside the image bounds.
Draw as much of an ellipse, including its contents, as lies inside the image bounds. Uses Midpoint Ellipse Drawing Algorithm. (Modified from Bresenham’s algorithm) (http://tutsheap.com/c/mid-point-ellipse-drawing-algorithm/)
Draw as much of an ellipse, including its contents, as lies inside the image bounds. Uses Midpoint Ellipse Drawing Algorithm. (Modified from Bresenham’s algorithm) (http://tutsheap.com/c/mid-point-ellipse-drawing-algorithm/)
Draw as much of a rectangle, including its boundary, as lies inside the image bounds.
Draw as much of a rectangle, including its boundary, as lies inside the image bounds.
Draw as much of a circle as lies inside the image bounds.
Draw as much of a circle as lies inside the image bounds.
Draw as much of an ellipse as lies inside the image bounds. Uses Midpoint Ellipse Drawing Algorithm. (Modified from Bresenham’s algorithm) (http://tutsheap.com/c/mid-point-ellipse-drawing-algorithm/)
Draw as much of an ellipse as lies inside the image bounds. Uses Midpoint Ellipse Drawing Algorithm. (Modified from Bresenham’s algorithm) (http://tutsheap.com/c/mid-point-ellipse-drawing-algorithm/)
Draws as much of the boundary of a rectangle as lies inside the image bounds.
Draws as much of the boundary of a rectangle as lies inside the image bounds.
Draws as much of the line segment between start and end as lies inside the image bounds. Uses Bresenham’s line drawing algorithm.
Draws as much of the line segment between start and end as lies inside the image bounds. Uses Bresenham’s line drawing algorithm.
Draws colored text on an image in place. scale is augmented font scaling on both the x and y axis (in pixels). Note that this function does not support newlines, you must do this manually
Draws colored text on an image in place. scale is augmented font scaling on both the x and y axis (in pixels). Note that this function does not support newlines, you must do this manually