From 2415a562f767b71641c7bee87fc033eff3ebc42a Mon Sep 17 00:00:00 2001 From: Kulikova Svetlana Date: Thu, 4 Mar 2021 09:27:26 +0300 Subject: [PATCH] fix put_BrushGradient removed access to properties whose names were collapsed --- common/Native/native_graphics.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/common/Native/native_graphics.js b/common/Native/native_graphics.js index f41d70a388..c8858dc55c 100644 --- a/common/Native/native_graphics.js +++ b/common/Native/native_graphics.js @@ -660,7 +660,15 @@ CNativeGraphics.prototype = }, put_BrushGradient : function(gradFill, points, transparent) { - this.Native["put_BrushGradient"](gradFill.colors, transparent, points.x0, points.y0, points.x1, points.y1, points.r0, points.r1); + var colors = new Array(gradFill.colors.length * 5); + for (var i = 0; i < gradFill.colors.length; i++) { + colors[i * 5] = gradFill.colors[i].pos; + colors[i * 5 + 1] = gradFill.colors[i].color.RGBA.R; + colors[i * 5 + 2] = gradFill.colors[i].color.RGBA.G; + colors[i * 5 + 3] = gradFill.colors[i].color.RGBA.B; + colors[i * 5 + 4] = gradFill.colors[i].color.RGBA.A; + } + this.Native["put_BrushGradient"](colors, transparent, points.x0, points.y0, points.x1, points.y1, points.r0, points.r1); }, TransformPointX : function(x, y) {