The geometry element’s data is a sequence of arbitrary polygons.
- iOS 10.0+
- macOS 10.12+
- Mac Catalyst 13.0+
- tvOS 10.0+
- watchOS 3.0+
data property holds two sequences of values.
The first sequence has a number of values equal to the geometry element’s
primitivevalue. Each value in this sequence specifies the number of vertices in a polygon primitive. For example, if the first sequence is
[5, 3], the geometry element contains a pentagon followed by a triangle.
The rest of the data is a sequence of vertex indices. Each entry in the first sequence specifies a corresponding number of entries in the second sequence. For example, if the first sequence includes the values
[5, 3], the second sequence includes five indices for the pentagon, followed by three indices for the triangle.
Figure 1 shows an example sequence and (assuming a corresponding geometry source) a possible arrangement of the vertices it identifies.