Back to Aurora Vision Library Lite website

You are here: Start » Image » Image Drawing » DrawRectangle

DrawRectangle


Header: AVL.h
Namespace: avl

Draws a rectangle on an image.

Syntax

void avl::DrawRectangle
(
	avl::Image& ioImage,
	const avl::Rectangle2D& inRectangle,
	atl::Optional<const avl::CoordinateSystem2D&> inRectangleAlignment,
	const avl::Pixel& inColor,
	const avl::DrawingStyle& inDrawingStyle
)

Parameters

Name Type Default Description
Input will be modified ioImage Image&
Input value inRectangle const Rectangle2D&
Input value inRectangleAlignment Optional<const CoordinateSystem2D&> NIL
Input value inColor const Pixel&
Input value inDrawingStyle const DrawingStyle&

Description

Filter draws rectangles on an input image.

If an rectangle dimensions exceeds image size it will not be drawn or will be drawn partially.

To indicate the Rectangle orientation set inDrawingStyle.PointShape and inDrawingStyle.Size.

Rectangle drawn with set orientation indicator inDrawingStyle.PointShape = Circle and inDrawingStyle.Size = 10.

Hints

  • Define inRectangle. This will be the primitives to be drawn.
  • Define inColor. Please note, that on an N-channel image only first N components of the color will be used.
  • Set inDrawingStyle to control quality, opacity, thickness, filling, point shapes and sizes.

See Also

  • DrawLine – Draws a line on an image.
  • DrawPath – Draws a path on an image.