Skip to main content

T8LDLinetypeData

Deduplicated linetype table. Index 0 is always CONTINUOUS (empty pattern). Rendering is NOT implemented in @twinfinity/core as of this release; consumers building their own renderers can use this metadata directly.

Index

Properties

count

count: number

Linetype count, including CONTINUOUS at index 0. Always >= 1.

dashCounts

dashCounts: UintArray

Dash count per linetype. 0 for CONTINUOUS. Stored as a typed array whose element width matches the on-wire variable-width selection (UInt8/UInt16/UInt32).

dashes

dashes: Float32Array<ArrayBufferLike>

Concatenated signed dash lengths across all linetypes. Positive = ink, negative = gap, zero = dot. Units: drawing units (not millimeters).

names

names: readonly string[]

Per-linetype names (UTF-8). May contain empty strings when writer omitted names.

patternLengths

patternLengths: Float32Array<ArrayBufferLike>

Per-linetype ∑|dashes[i]| precomputed at write time (drawing units).

patternStarts

patternStarts: Uint32Array<ArrayBufferLike>

Prefix-sum into dashes. dashes.subarray(patternStarts[i], patternStarts[i+1]) yields the dash array for linetype i. Length count + 1.