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
Namespace: Dynamsoft.Utility
public class LayoutAxis
Properties
| Property | Type | Description |
|---|---|---|
elementCount |
int | Expected number of elements along this axis. Use -1 for auto-detection. |
isStaggered |
bool | Whether the layout uses an offset/staggered (brick-like) pattern. |
angle |
int | Target angle in degrees [0, 180]. Use -1 for auto-detection. |
isEqualSpacing |
bool | Force equal gaps between elements. |
spacing |
int | Spacing between elements along this axis. Use -1 for auto-detection. |
spacingUnit |
MeasureUnit | Interpretation mode for the spacing value. |
elementCount
public int elementCount = -1;
isStaggered
public bool isStaggered = false;
angle
public int angle = -1;
isEqualSpacing
public bool isEqualSpacing = false;
spacing
Spacing between elements along this axis. Use -1 for auto-detection.
- In
MU_PIXELmode: absolute pixel count. - In
MU_PERCENTAGEmode: percentage of the element’s characteristic size (e.g., 200 = 200% = twice the reference width).
public int spacing = -1;
spacingUnit
public MeasureUnit spacingUnit = MeasureUnit.MU_PIXEL;
See Also