read static 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) {
    var capValue = strokeCapLookup[reader.readUint8('cap')];
    if (capValue != null) {
      component._cap = capValue;
    }
    var joinValue = strokeJoinLookup[reader.readUint8('join')];
    if (joinValue != null) {
      component._join = joinValue;
    }
    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');
      }
    }
  }
}