Ejemplo n.º 1
0
 def build(self) -> Optional[ot.LayerV1List]:
     if not self.layers:
         return None
     layers = ot.LayerV1List()
     layers.LayerCount = len(self.layers)
     layers.Paint = self.layers
     return layers
Ejemplo n.º 2
0
def buildLayerV1List(
        layers: Sequence[Union[_LayerTuple,
                               ot.LayerV1Record]]) -> ot.LayerV1List:
    self = ot.LayerV1List()
    self.LayerCount = len(layers)
    records = []
    for layer in layers:
        if isinstance(layer, ot.LayerV1Record):
            record = layer
        else:
            layerGlyph, paint = layer
            record = buildLayerV1Record(layerGlyph, paint)
        records.append(record)
    self.LayerV1Record = records
    return self
Ejemplo n.º 3
0
 def build(self) -> ot.LayerV1List:
     layers = ot.LayerV1List()
     layers.LayerCount = len(self.layers)
     layers.Paint = self.layers
     return layers