Lines Matching refs:deltas
313 def compileDeltaValues_(deltas): argument
331 while pos < len(deltas):
332 value = deltas[pos]
334 pos = TupleVariation.encodeDeltaRunAsZeroes_(deltas, pos, stream)
336 pos = TupleVariation.encodeDeltaRunAsBytes_(deltas, pos, stream)
338 pos = TupleVariation.encodeDeltaRunAsWords_(deltas, pos, stream)
342 def encodeDeltaRunAsZeroes_(deltas, offset, stream): argument
345 numDeltas = len(deltas)
346 while pos < numDeltas and runLength < 64 and deltas[pos] == 0:
354 def encodeDeltaRunAsBytes_(deltas, offset, stream): argument
357 numDeltas = len(deltas)
359 value = deltas[pos]
370 if value == 0 and pos+1 < numDeltas and deltas[pos+1] == 0:
377 stream.write(struct.pack('b', otRound(deltas[i])))
381 def encodeDeltaRunAsWords_(deltas, offset, stream): argument
384 numDeltas = len(deltas)
386 value = deltas[pos]
404 if isByteEncodable(value) and pos+1 < numDeltas and isByteEncodable(deltas[pos+1]):
411 stream.write(struct.pack('>h', otRound(deltas[i])))
427 deltas = array.array("h")
430 deltas = array.array("b")
432 deltas.fromstring(data[pos:pos+deltasSize])
433 if sys.byteorder != "big": deltas.byteswap()
434 assert len(deltas) == numDeltasInRun
436 result.extend(deltas)
591 deltas = [None] * pointCount
598 deltas[p] = delta
607 deltas[p] = (x, y)
609 return TupleVariation(axes, deltas)