setPrimitiveType method
How the following draws assemble their vertices.
A backend need not have all five, and one here does not. The software rasteriser draws PrimitiveType.triangle and PrimitiveType.line and throws an UnsupportedError for the other three — from the draw rather than from here, because that is where it finds out. There is no capability to ask first, unlike wireframe or the stencil: nothing in this engine has ever wanted a strip or a point, so no query would have had a caller. What the contract does promise is the refusal — a backend may not assemble one primitive as another, because three points drawn as a triangle is a picture nobody asked for and no error anywhere.
Held by the conformance check
every primitive type is assembled as itself or refused, which draws all
five and compares how much each one painted.
Implementation
@override
void setPrimitiveType(PrimitiveType type) {
primitiveType = type;
commands.add(RecordedPrimitiveType(type));
}