Table of contents

LayoutAxis

The LayoutAxis class holds configuration for a specific orientation axis used in layout analysis. Layout analysis involves two axes:

  • Axis 0 (Primary): The direction of flow within a line.
  • Axis 1 (Secondary): The direction in which lines are stacked.

Definition

Package: com.dynamsoft.utility

class LayoutAxis

Attributes

Attribute Type Description
elementCount int Expected number of elements along this axis. Use -1 for auto-detection.
isStaggered boolean Whether the layout uses an offset/staggered (brick-like) pattern.
angle int Target angle in degrees [0, 180]. Use -1 for auto-detection.
isEqualSpacing boolean Force equal gaps between elements.
spacing int Spacing between elements along this axis. Use -1 for auto-detection.
spacingUnit int Interpretation mode for the spacing value.

elementCount

public int elementCount = -1;

isStaggered

public boolean isStaggered = false;

angle

public int angle = -1;

isEqualSpacing

public boolean isEqualSpacing = false;

spacing

Spacing between elements along this axis. Use -1 for auto-detection.

  • In MU_PIXEL mode: absolute pixel count.
  • In MU_PERCENTAGE mode: percentage of the element’s characteristic size (e.g., 200 = 200% = twice the reference width).
public int spacing = -1;

spacingUnit

public @EnumMeasureUnit int spacingUnit = EnumMeasureUnit.MU_PIXEL;

See Also

EnumMeasureUnit

This page is compatible for: