Back to Aurora Vision Library Lite website

You are here: Start » Region » Region Basics » CreateSegmentRegion

CreateSegmentRegion


Header: AVL.h
Namespace: avl

Creates a segment region.

Syntax

void avl::CreateSegmentRegion
(
	const avl::Segment2D& inSegment,
	atl::Optional<const avl::CoordinateSystem2D&> inSegmentAlignment,
	float inWidth,
	int inFrameWidth,
	int inFrameHeight,
	bool inRound,
	avl::Region& outRegion,
	atl::Optional<avl::Segment2D&> outAlignedSegment = atl::NIL
)

Parameters

Name Type Range Default Description
Input value inSegment const Segment2D&
Input value inSegmentAlignment Optional<const CoordinateSystem2D&> NIL
Input value inWidth float 1.0 - Segment width
Input value inFrameWidth int 0 - 65535
Input value inFrameHeight int 0 - 65535
Input value inRound bool Make ends of segment round
Output value outRegion Region& Output region
Output value outAlignedSegment Optional<Segment2D&> NIL

Optional Outputs

The computation of following outputs can be switched off by passing value atl::NIL to these parameters: outAlignedSegment.

Read more about Optional Outputs.

Description

Filter creates region based on an input Segment2D. To specify line width use inWidth.

Filter creates segment region by creating rectangle located between inSegment points. To make ends round use inRound.

Examples

Example region with inRound=False
Example region with inRound=True