read method

void read (
  1. ActorArtboard artboard,
  2. StreamReader reader,
  3. ActorStroke component
)

Implementation

static void read(
    ActorArtboard artboard, StreamReader reader, ActorStroke component) {
  component.width = reader.readFloat32("width");
  if (artboard.actor.version >= 19) {
    component._cap = strokeCapLookup[reader.readUint8("cap")];
    component._join = strokeJoinLookup[reader.readUint8("join")];
    if (artboard.actor.version >= 20) {
      component._trim =
          trimPathLookup[reader.readUint8("trim")] ?? TrimPath.off;
      if (component.isTrimmed) {
        component._trimStart = reader.readFloat32("start");
        component._trimEnd = reader.readFloat32("end");
        component._trimOffset = reader.readFloat32("offset");
      }
    }
  }
}