Commit 33817b70 authored by GoshaZotov's avatar GoshaZotov

+ previous revision

parent f4b65d84
...@@ -7223,9 +7223,24 @@ drawHBarChart.prototype = ...@@ -7223,9 +7223,24 @@ drawHBarChart.prototype =
var shade = "shade"; var shade = "shade";
var shadeValue1 = 35000; var shadeValue1 = 35000;
var shadeValue2 = 45000; var shadeValue2 = 45000;
var t = this;
if(brushFill.fill.lin && null !== brushFill.fill.lin.angle) if(brushFill.fill.lin && null !== brushFill.fill.lin.angle)
{ {
var getCSolidColor = function(color, colorMod)
{
var duplicateBrush = brushFill.createDuplicate();
var tempColor = new AscFormat.CUniFill();
tempColor.setFill(new AscFormat.CSolidFill());
tempColor.fill.setColor(color);
if(colorMod)
{
tempColor = t._applyColorModeByBrush(tempColor, colorMod);
}
return tempColor;
};
var angle = brushFill.fill.lin.angle / angleKf; var angle = brushFill.fill.lin.angle / angleKf;
var colors = brushFill.fill.colors; var colors = brushFill.fill.colors;
...@@ -7241,30 +7256,18 @@ drawHBarChart.prototype = ...@@ -7241,30 +7256,18 @@ drawHBarChart.prototype =
} }
else if(faceIndex === c_oChartBar3dFaces.left) else if(faceIndex === c_oChartBar3dFaces.left)
{ {
var duplicateBrush = brushFill.createDuplicate(); gradientBrush = getCSolidColor(colors[0].color);
var tempColor = new AscFormat.CUniFill();
tempColor.setFill(new AscFormat.CSolidFill());
tempColor.fill.setColor(colors[0].color);
gradientBrush = tempColor;
} }
else if(faceIndex === c_oChartBar3dFaces.right) else if(faceIndex === c_oChartBar3dFaces.right)
{ {
var duplicateBrush = brushFill.createDuplicate(); gradientBrush = getCSolidColor(colors[colors.length - 1].color);
var tempColor = new AscFormat.CUniFill();
tempColor.setFill(new AscFormat.CSolidFill());
tempColor.fill.setColor(colors[colors.length - 1].color);
gradientBrush = tempColor;
} }
} }
else if(angle >= 45 && angle < 90) else if(angle >= 45 && angle < 90)
{ {
if(faceIndex === c_oChartBar3dFaces.up || faceIndex === c_oChartBar3dFaces.left) if(faceIndex === c_oChartBar3dFaces.up || faceIndex === c_oChartBar3dFaces.left)
{ {
var duplicateBrush = brushFill.createDuplicate(); gradientBrush = getCSolidColor(colors[0].color, shadeValue1);
var tempColor = new AscFormat.CUniFill();
tempColor.setFill(new AscFormat.CSolidFill());
tempColor.fill.setColor(colors[0].color);
gradientBrush = this._applyColorModeByBrush(tempColor, shadeValue1);
} }
else if(faceIndex === c_oChartBar3dFaces.right) else if(faceIndex === c_oChartBar3dFaces.right)
{ {
...@@ -7276,22 +7279,14 @@ drawHBarChart.prototype = ...@@ -7276,22 +7279,14 @@ drawHBarChart.prototype =
} }
else if(faceIndex === c_oChartBar3dFaces.down) else if(faceIndex === c_oChartBar3dFaces.down)
{ {
var duplicateBrush = brushFill.createDuplicate(); gradientBrush = getCSolidColor(colors[colors.length - 1].color);
var tempColor = new AscFormat.CUniFill();
tempColor.setFill(new AscFormat.CSolidFill());
tempColor.fill.setColor(colors[colors.length - 1].color);
gradientBrush = tempColor;
} }
} }
else if(angle >= 90 && angle < 135) else if(angle >= 90 && angle < 135)
{ {
if(faceIndex === c_oChartBar3dFaces.up || faceIndex === c_oChartBar3dFaces.left) if(faceIndex === c_oChartBar3dFaces.up || faceIndex === c_oChartBar3dFaces.left)
{ {
var duplicateBrush = brushFill.createDuplicate(); gradientBrush = getCSolidColor(colors[0].color, shadeValue1);
var tempColor = new AscFormat.CUniFill();
tempColor.setFill(new AscFormat.CSolidFill());
tempColor.fill.setColor(colors[0].color);
gradientBrush = this._applyColorModeByBrush(tempColor, shadeValue1);
} }
else if(faceIndex === c_oChartBar3dFaces.right) else if(faceIndex === c_oChartBar3dFaces.right)
{ {
...@@ -7303,22 +7298,14 @@ drawHBarChart.prototype = ...@@ -7303,22 +7298,14 @@ drawHBarChart.prototype =
} }
else if(faceIndex === c_oChartBar3dFaces.down) else if(faceIndex === c_oChartBar3dFaces.down)
{ {
var duplicateBrush = brushFill.createDuplicate(); gradientBrush = getCSolidColor(colors[colors.length - 1].color);
var tempColor = new AscFormat.CUniFill();
tempColor.setFill(new AscFormat.CSolidFill());
tempColor.fill.setColor(colors[colors.length - 1].color);
gradientBrush = tempColor;
} }
} }
else if(angle >= 135 && angle < 180) else if(angle >= 135 && angle < 180)
{ {
if(faceIndex === c_oChartBar3dFaces.up || faceIndex === c_oChartBar3dFaces.left || faceIndex === c_oChartBar3dFaces.right) if(faceIndex === c_oChartBar3dFaces.up || faceIndex === c_oChartBar3dFaces.left || faceIndex === c_oChartBar3dFaces.right)
{ {
var duplicateBrush = brushFill.createDuplicate(); gradientBrush = getCSolidColor(colors[0].color, shadeValue1);
var tempColor = new AscFormat.CUniFill();
tempColor.setFill(new AscFormat.CSolidFill());
tempColor.fill.setColor(colors[0].color);
gradientBrush = this._applyColorModeByBrush(tempColor, shadeValue1);
} }
else if(faceIndex === c_oChartBar3dFaces.down) else if(faceIndex === c_oChartBar3dFaces.down)
{ {
...@@ -7341,19 +7328,11 @@ drawHBarChart.prototype = ...@@ -7341,19 +7328,11 @@ drawHBarChart.prototype =
} }
else if(faceIndex === c_oChartBar3dFaces.right) else if(faceIndex === c_oChartBar3dFaces.right)
{ {
var duplicateBrush = brushFill.createDuplicate(); gradientBrush = getCSolidColor(colors[0].color, shadeValue1);
var tempColor = new AscFormat.CUniFill();
tempColor.setFill(new AscFormat.CSolidFill());
tempColor.fill.setColor(colors[0].color);
gradientBrush = this._applyColorModeByBrush(tempColor, shadeValue1);
} }
else if(faceIndex === c_oChartBar3dFaces.left) else if(faceIndex === c_oChartBar3dFaces.left)
{ {
var duplicateBrush = brushFill.createDuplicate(); gradientBrush = getCSolidColor(colors[colors.length - 1].color, shadeValue1);
var tempColor = new AscFormat.CUniFill();
tempColor.setFill(new AscFormat.CSolidFill());
tempColor.fill.setColor(colors[colors.length - 1].color);
gradientBrush = tempColor;
} }
} }
else if(angle >= 225 && angle < 270) else if(angle >= 225 && angle < 270)
...@@ -7368,30 +7347,18 @@ drawHBarChart.prototype = ...@@ -7368,30 +7347,18 @@ drawHBarChart.prototype =
} }
else if(faceIndex === c_oChartBar3dFaces.left || faceIndex === c_oChartBar3dFaces.down || faceIndex === c_oChartBar3dFaces.right) else if(faceIndex === c_oChartBar3dFaces.left || faceIndex === c_oChartBar3dFaces.down || faceIndex === c_oChartBar3dFaces.right)
{ {
var duplicateBrush = brushFill.createDuplicate(); gradientBrush = getCSolidColor(colors[0].color, shadeValue1);
var tempColor = new AscFormat.CUniFill();
tempColor.setFill(new AscFormat.CSolidFill());
tempColor.fill.setColor(colors[0].color);
gradientBrush = this._applyColorModeByBrush(tempColor, shadeValue1);
} }
} }
else if(angle >= 270 && angle < 315) else if(angle >= 270 && angle < 315)
{ {
if(faceIndex === c_oChartBar3dFaces.up) if(faceIndex === c_oChartBar3dFaces.up)
{ {
var duplicateBrush = brushFill.createDuplicate(); gradientBrush = getCSolidColor(colors[colors.length - 1].color);
var tempColor = new AscFormat.CUniFill();
tempColor.setFill(new AscFormat.CSolidFill());
tempColor.fill.setColor(colors[colors.length - 1].color);
gradientBrush = tempColor;
} }
else if(faceIndex === c_oChartBar3dFaces.left || faceIndex === c_oChartBar3dFaces.down) else if(faceIndex === c_oChartBar3dFaces.left || faceIndex === c_oChartBar3dFaces.down)
{ {
var duplicateBrush = brushFill.createDuplicate(); gradientBrush = getCSolidColor(colors[0].color, shadeValue1);
var tempColor = new AscFormat.CUniFill();
tempColor.setFill(new AscFormat.CSolidFill());
tempColor.fill.setColor(colors[0].color);
gradientBrush = this._applyColorModeByBrush(tempColor, shadeValue1);
} }
else if(faceIndex === c_oChartBar3dFaces.right) else if(faceIndex === c_oChartBar3dFaces.right)
{ {
...@@ -7414,11 +7381,7 @@ drawHBarChart.prototype = ...@@ -7414,11 +7381,7 @@ drawHBarChart.prototype =
} }
else if(faceIndex === c_oChartBar3dFaces.left || faceIndex === c_oChartBar3dFaces.down) else if(faceIndex === c_oChartBar3dFaces.left || faceIndex === c_oChartBar3dFaces.down)
{ {
var duplicateBrush = brushFill.createDuplicate(); gradientBrush = getCSolidColor(colors[0].color, shadeValue1);
var tempColor = new AscFormat.CUniFill();
tempColor.setFill(new AscFormat.CSolidFill());
tempColor.fill.setColor(colors[0].color);
gradientBrush = applyColorModeByBrush(tempColor, shadeValue1);
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment