Table of Contents

Class ArrangeItem

Namespace
GeometryHelper.Arranging
Assembly
GeometryHelper.dll

A label to place: the box it takes up, the leader it belongs to, and what it has to keep clear of.

public sealed class ArrangeItem
Inheritance
ArrangeItem
Inherited Members

Remarks

Run(IReadOnlyList<ArrangeItem>, ArrangeOptions) only reads it. Where the label goes comes back as an ArrangeResult, so the same items can be run again, with other options or on another thread, and are still what they were.

Properties

BlockLines

Gets or sets the segments the label must not overlap; empty unless set, and null reads as empty.

BlockPolygons

Gets or sets the regions the label must not overlap; empty unless set, and null reads as empty.

Box

Gets or sets the box of the label: the rectangle that is moved.

Leader

Gets or sets the leader: the segment of the object the label belongs to. The candidate positions spread out from its midpoint, in rows on either side of it, each sliding along it.

Offset

Sets the least gap between the edge of the label and the leader on both sides of it at once: OffsetTop and OffsetBottom both take the value. It only sets, and holds nothing of its own, so it cannot be read; the sides are what placement reads.

The gaps belong to the label rather than to ArrangeOptions because labels differ: a large text may have to stand further off than a small one.

OffsetBottom

Gets or sets the least gap between the edge of the label and the leader on the side of the leader that faces down in the drawing, towards smaller Y, and for a vertical leader the right; 50 unless set, here or through Offset.

OffsetTop

Gets or sets the least gap between the edge of the label and the leader on the side of the leader that faces up in the drawing, towards greater Y; 50 unless set, here or through Offset. The first row of candidates on that side lies half the height of the label plus this from the leader.

Side

Gets or sets which side of the leader the label may stand on; Both unless set.

Methods

GetPlacePoints()

Gets the positions the centre of the label is tried at, with the default options.

GetPlacePoints(ArrangeOptions)

Gets the positions the centre of the label is tried at: rows on either side of the leader, or on the one side Side keeps the label to, each sliding along it. Every algorithm chooses among these.