DSLayoutAxis
The DSLayoutAxis class provides configuration for a single axis in layout analysis.
Definition
Assembly: DynamsoftCaptureVisionBundle.xcframework
- Objective-C
- Swift
NS_SWIFT_NAME(LayoutAxis) @interface DSLayoutAxis : NSObjectclass LayoutAxis : NSObject
Attributes
| Attribute | Type | Description |
|---|---|---|
elementCount |
NSInteger | Expected number of elements along this axis. Use -1 for auto-detection. |
isStaggered |
BOOL | Whether the layout uses an offset/staggered pattern. |
angle |
NSInteger | Target angle [0, 180]. Use -1 for auto-detection. |
isEqualSpacing |
BOOL | Force equal gaps between elements. When false, spacing is ignored. |
spacing |
NSInteger | Spacing between elements along this axis. Use -1 for auto-detection. |
spacingUnit |
DSMeasureUnit | Interpretation mode for the spacing value. |
elementCount
Expected number of elements along this axis. Use -1 for auto-detection.
- Objective-C
- Swift
@property (nonatomic, assign) NSInteger elementCount;var elementCount: Int { get set }
isStaggered
Whether the layout uses an offset/staggered pattern.
- Objective-C
- Swift
@property (nonatomic, assign) BOOL isStaggered;var isStaggered: Bool { get set }
angle
Target angle [0, 180]. Use -1 for auto-detection.
- Objective-C
- Swift
@property (nonatomic, assign) NSInteger angle;var angle: Int { get set }
isEqualSpacing
Force equal gaps between elements. When false, spacing is ignored.
- Objective-C
- Swift
@property (nonatomic, assign) BOOL isEqualSpacing;var isEqualSpacing: Bool { get set }
spacing
Spacing between elements along this axis. Use -1 for auto-detection.
- Objective-C
- Swift
@property (nonatomic, assign) NSInteger spacing;var spacing: Int { get set }
spacingUnit
Interpretation mode for the spacing value.
- Objective-C
- Swift
@property (nonatomic, assign) DSMeasureUnit spacingUnit;var spacingUnit: MeasureUnit { get set }