# [−][src]Module imageproc::drawing

Helpers for drawing basic shapes on images.

## Structs

Blend | A canvas that blends pixels when drawing. |

BresenhamLineIter | Iterates over the coordinates in a line segment using Bresenham's line drawing algorithm. |

BresenhamLinePixelIter | Iterates over the image pixels in a line segment using Bresenham's line drawing algorithm. |

BresenhamLinePixelIterMut | Iterates over the image pixels in a line segment using Bresenham's line drawing algorithm. |

## Traits

Canvas | A surface for drawing on - many drawing functions in this
library are generic over a |

## Functions

draw_antialiased_line_segment | 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 |

draw_antialiased_line_segment_mut | 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 |

draw_cross | Draws a colored cross on an image. Handles coordinates outside image bounds. |

draw_cross_mut | Draws a colored cross on an image in place. Handles coordinates outside image bounds. |

draw_cubic_bezier_curve | Draws as much of a cubic bezier curve as lies within image bounds. |

draw_cubic_bezier_curve_mut | Draws as much of a cubic bezier curve as lies within image bounds. |

draw_filled_circle | Draw as much of a circle and its contents as lies inside the image bounds. |

draw_filled_circle_mut | Draw as much of a circle, including its contents, as lies inside the image bounds. |

draw_filled_ellipse | 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_filled_ellipse_mut | 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_filled_rect | Draw as much of a rectangle, including its boundary, as lies inside the image bounds. |

draw_filled_rect_mut | Draw as much of a rectangle, including its boundary, as lies inside the image bounds. |

draw_hollow_circle | Draw as much of a circle as lies inside the image bounds. |

draw_hollow_circle_mut | Draw as much of a circle as lies inside the image bounds. |

draw_hollow_ellipse | 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_hollow_ellipse_mut | 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_hollow_rect | Draws as much of the boundary of a rectangle as lies inside the image bounds. |

draw_hollow_rect_mut | Draws as much of the boundary of a rectangle as lies inside the image bounds. |

draw_line_segment | Draws as much of the line segment between start and end as lies inside the image bounds. Uses Bresenham's line drawing algorithm. |

draw_line_segment_mut | Draws as much of the line segment between start and end as lies inside the image bounds. Uses Bresenham's line drawing algorithm. |

draw_polygon | Draws as much of a filled 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. |

draw_polygon_mut | Draws as much of a filled 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. |

draw_text | Draws colored text on an image in place. |

draw_text_mut | Draws colored text on an image in place. |