LayoutAxis
The LayoutAxis structure 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
Assembly: DynamsoftUtility
Header File: DynamsoftUtility.h
typedef struct LayoutAxis
{
int elementCount;
bool isStaggered;
int angle;
bool isEqualSpacing;
int spacing;
MeasureUnit spacingUnit;
char reserved[32];
} LayoutAxis;
Attributes
| Attribute | Type | Description |
|---|---|---|
elementCount |
int | Expected number of elements along this axis. |
isStaggered |
bool | Whether the layout uses an offset/staggered (brick-like) pattern. |
angle |
int | Target angle in degrees [0, 180]. |
isEqualSpacing |
bool | Force equal gaps between elements. |
spacing |
int | Spacing between elements along this axis. |
spacingUnit |
MeasureUnit | Interpretation mode for the spacing value. |
elementCount
Expected number of elements along this axis. Use -1 for auto-detection.
int elementCount = -1;
isStaggered
Whether the layout uses an offset/staggered (brick-like) pattern.
bool isStaggered = false;
angle
Target angle in degrees [0, 180]. Use -1 for auto-detection.
int angle = -1;
isEqualSpacing
Force equal gaps between elements. When false, spacing is ignored.
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).
int spacing = -1;
spacingUnit
Interpretation mode for the spacing value.
MeasureUnit spacingUnit = MU_PIXEL;
See Also