Commit 919452a6 authored by Sergey Luzyanin's avatar Sergey Luzyanin

change unicolor mod type: shade->wordShade, tint->wordTint

parent e82f7027
......@@ -358,7 +358,27 @@ function CreateUniFillFromExcelColor(oExcelColor)
if(oExcelColor instanceof ThemeColor)
{
oUnifill = CreateUniFillSchemeColorWidthTint(map_themeExcel_to_themePresentation[oExcelColor.theme], oExcelColor.tint != null ? oExcelColor.tint : 0);
oUnifill = CreateUnifillSolidFillSchemeColorByIndex(map_themeExcel_to_themePresentation[oExcelColor.theme]);
if(oExcelColor.tint != null)
{
var unicolor = oUnifill.fill.color;
if(!unicolor.Mods)
unicolor.setMods(new CColorModifiers());
var mod = new CColorMod();
if(oExcelColor.tint > 0)
{
mod.setName("wordTint");
mod.setVal(Math.round(oExcelColor.tint*255));
}
else
{
mod.setName("wordShade");
mod.setVal(Math.round(255 + oExcelColor.tint*255));
}
unicolor.Mods.addMod(mod);
}
//oUnifill = CreateUniFillSchemeColorWidthTint(map_themeExcel_to_themePresentation[oExcelColor.theme], oExcelColor.tint != null ? oExcelColor.tint : 0);
}
else
{
......@@ -2273,11 +2293,12 @@ function DrawingObjects() {
};
_this.drawSparkLineGroups = function(oDrawingContext, oSparklineGroups, range)
{
oDrawingContext.save();
var graphics = new CGraphics();
graphics.init(oDrawingContext.ctx, oDrawingContext.getWidth(0), oDrawingContext.getHeight(0),
oDrawingContext.getWidth(3)*nSparklineMultiplier, oDrawingContext.getHeight(3)*nSparklineMultiplier);
graphics.m_oFontManager = g_fontManager;
graphics.SaveGrState();
for(var i = 0; i < oSparklineGroups.arrSparklineGroup.length; ++i) {
var oSparklineGroup = oSparklineGroups.arrSparklineGroup[i];
for(var j = 0; j < oSparklineGroup.arrSparklines.length; ++j) {
......@@ -2292,7 +2313,7 @@ function DrawingObjects() {
oSparklineGroup.arrCachedSparklines[j].draw(graphics);
}
}
graphics.RestoreGrState();
oDrawingContext.restore();
};
_this.rebuildChartGraphicObjects = function(data)
......
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