A3DGraphLinePatternData
-
struct
A3DGraphLinePatternData 2D line pattern descriptor.
2.0A3DGraphStyleDatacan hold a line pattern, which describes how lines are represented: continous, dashed, dotted or a mix of some.- The length of the line segment (the stroke)
- The length of the spacing before the next segment is drawned (the blank)
A line pattern is made of segments, which are cycled through in the order they are written in. Each segment is represented by a pair of
A3DDoublevalues:All segments are written sequentially in a C-Style array,
m_pdLengths, each of them consisting of its stroke/blank pair. Thus, when describing a line pattern consisting in s segments, the array has the following layout:**** | Stroke | Blank
- Segment 0 | 0 | 1
- Segment 1 | 2 | 3
- Segment 2 | 4 | 5
- … | … | …
- Segment s-1 | … | i-1
The total number of elements in the array is i and is twice s.
For example a continuous line segment can be described using any non-zero value for the stroke, and
0.0for the blank:{5.0, 0.0}. A dotted pattern would be described using a unit length for the stroke and a wider value for the blank ({1.0, 5.0}) while the other way around would end up having a dashed pattern ({5.0, 1.0}).Using any combinaison of those segments description would give a mixed pattern:
{1.0, 5.0, 5.0, 0.0, 5.0, 1.0}.- continuous:
_______________ - dotted:
_ _ _ - dashed:
_____ _____ _____ - mixed:
_ __________ _ __________ _ __________
An ASCII representation of these patterns, repeated three times, would give:
The actual length of each segment depends on the drawing implementation and the
m_bRealLengthoption (see below).m_dPhaseis a length value that offsets the starting position within the pattern. By default the value is0.0(no offset).
Variables
-
A3DUns32
A3DGraphLinePatternData.m_uiNumberOfLengths -
The size of
m_pdLengthsin bytes.
-
A3DDouble *
A3DGraphLinePatternData.m_pdLengths -
The array of segments describing the pattern.
-
A3DDouble
A3DGraphLinePatternData.m_dPhase -
Offset value defining the starting position of the pattern within the array.
-
A3DBool
A3DGraphLinePatternData.m_bRealLength -
If
A3D_TRUE, segments lengths are expressed in absolute values, using unit model file.