Exemple #1
0
def buildColorLine(stops: _ColorStopsList,
                   extend: _ExtendInput = ExtendMode.PAD) -> ot.ColorLine:
    self = ot.ColorLine()
    self.Extend = _to_extend_mode(extend)
    self.StopCount = len(stops)
    self.ColorStop = [
        stop if isinstance(stop, ot.ColorStop) else buildColorStop(**stop)
        if isinstance(stop, collections.abc.Mapping) else buildColorStop(*stop)
        for stop in stops
    ]
    return self
def _defaultColorLine():
    colorLine = ot.ColorLine()
    colorLine.Extend = ExtendMode.PAD
    return colorLine