add unbuildPaintSweepGradient
This commit is contained in:
parent
22d290b06e
commit
e20ccfcf9f
@ -113,6 +113,18 @@ class LayerV1ListUnbuilder:
|
|||||||
"r1": r1,
|
"r1": r1,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def unbuildPaintSweepGradient(self, paint):
|
||||||
|
return {
|
||||||
|
"format": int(ot.Paint.Format.PaintSweepGradient),
|
||||||
|
"colorLine": unbuildColorLine(
|
||||||
|
paint.ColorLine, ignoreVarIdx=self.ignoreVarIdx
|
||||||
|
),
|
||||||
|
"centerX": self.unbuildVariableValue(paint.centerX),
|
||||||
|
"centerY": self.unbuildVariableValue(paint.centerY),
|
||||||
|
"startAngle": self.unbuildVariableValue(paint.startAngle),
|
||||||
|
"endAngle": self.unbuildVariableValue(paint.endAngle),
|
||||||
|
}
|
||||||
|
|
||||||
def unbuildPaintGlyph(self, paint):
|
def unbuildPaintGlyph(self, paint):
|
||||||
return {
|
return {
|
||||||
"format": int(ot.Paint.Format.PaintGlyph),
|
"format": int(ot.Paint.Format.PaintGlyph),
|
||||||
|
@ -103,7 +103,25 @@ TEST_COLOR_GLYPHS = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"glyph00015": [
|
"glyph00015": {
|
||||||
|
"format": int(ot.Paint.Format.PaintGlyph),
|
||||||
|
"glyph": "glyph00011",
|
||||||
|
"paint": {
|
||||||
|
"format": int(ot.Paint.Format.PaintSweepGradient),
|
||||||
|
"colorLine": {
|
||||||
|
"stops": [
|
||||||
|
{"offset": 0.0, "paletteIndex": 3, "alpha": 1.0},
|
||||||
|
{"offset": 1.0, "paletteIndex": 5, "alpha": 1.0},
|
||||||
|
],
|
||||||
|
"extend": "pad",
|
||||||
|
},
|
||||||
|
"centerX": 259,
|
||||||
|
"centerY": 300,
|
||||||
|
"startAngle": 45.0,
|
||||||
|
"endAngle": 135.0,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"glyph00016": [
|
||||||
{
|
{
|
||||||
"format": int(ot.Paint.Format.PaintGlyph),
|
"format": int(ot.Paint.Format.PaintGlyph),
|
||||||
"glyph": "glyph00011",
|
"glyph": "glyph00011",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user