Commit f076a885 authored by Alexander.Trofimov's avatar Alexander.Trofimov

common/Drawings/ColorArray to function-closure

parent d5539409
......@@ -13,6 +13,7 @@
"../common/NumFormat.js",
"../common/Drawings/ArcTo.js",
"../common/Drawings/ColorArray.js",
"../common/Drawings/Format/Constants.js",
"../common/Drawings/CommonController.js",
......@@ -85,7 +86,6 @@
"../cell/view/EventsController.js",
"../cell/view/WorkbookView.js",
"../word/Editor/SerializeCommon.js",
"../common/Drawings/ColorArray.js",
"../common/Shapes/Serialize.js",
"../common/Shapes/SerializeWriter.js",
"../common/SerializeCommonWordExcel.js",
......
......@@ -13,6 +13,7 @@
"../common/NumFormat.js",
"../common/Drawings/ArcTo.js",
"../common/Drawings/ColorArray.js",
"../common/Drawings/Format/Constants.js",
"../common/Drawings/CommonController.js",
......@@ -84,7 +85,6 @@
"../common/Shapes/Serialize.js",
"../common/Shapes/SerializeWriter.js",
"../word/Editor/SerializeCommon.js",
"../common/Drawings/ColorArray.js",
"../slide/Editor/Format/Presentation.js",
"../cell/view/DrawingObjectsController.js",
"../slide/Editor/DrawingObjectsController.js",
......
......@@ -16,6 +16,7 @@
"../common/NumFormat.js",
"../common/Drawings/ArcTo.js",
"../common/Drawings/ColorArray.js",
"../common/Drawings/Format/Constants.js",
"../common/Drawings/CommonController.js",
......@@ -59,7 +60,6 @@
"../common/Drawings/TrackObjects/ResizeTracks.js",
"../common/Drawings/TrackObjects/RotateTracks.js",
"../common/Drawings/TrackObjects/Spline.js",
"../common/Drawings/ColorArray.js",
"../common/Drawings/DrawingObjectsHandlers.js",
"../common/Drawings/Hit.js",
"../common/Drawings/Joined.js",
......
......@@ -3,6 +3,8 @@
// Import
var getFullImageSrc2 = AscCommon.getFullImageSrc2;
var CShapeColor = AscFormat.CShapeColor;
var c_oAscFill = Asc.c_oAscFill;
function DrawLineEnd(xEnd, yEnd, xPrev, yPrev, type, w, len, drawer, trans)
......
"use strict";
(function(){
function CShapeColor(r, g, b){
this.r = r;
this.g = g;
......@@ -129,4 +131,9 @@ function HSLToRGB(HSLColor) { //{h : 0..360, s : 0..1, l : 0..1}
if(g>255) g=255;
if(b>255) b=255;
return {r : r, g : g, b : b};//{r : 0..255, g : 0..255, b : 0..255}
}
\ No newline at end of file
}
//--------------------------------------------------------export----------------------------------------------------
window['AscFormat'] = window['AscFormat'] || {};
window['AscFormat'].CShapeColor = CShapeColor;
})();
......@@ -832,25 +832,25 @@ CShapeDrawer.prototype =
var rgba = this.FillUniColor;
if (mode == "darken")
{
var _color1 = new CShapeColor(rgba.R, rgba.G, rgba.B);
var _color1 = new AscFormat.CShapeColor(rgba.R, rgba.G, rgba.B);
var rgb = _color1.darken();
rgba = { R: rgb.r, G: rgb.g, B: rgb.b, A: rgba.A };
}
else if (mode == "darkenLess")
{
var _color1 = new CShapeColor(rgba.R, rgba.G, rgba.B);
var _color1 = new AscFormat.CShapeColor(rgba.R, rgba.G, rgba.B);
var rgb = _color1.darkenLess();
rgba = { R: rgb.r, G: rgb.g, B: rgb.b, A: rgba.A };
}
else if (mode == "lighten")
{
var _color1 = new CShapeColor(rgba.R, rgba.G, rgba.B);
var _color1 = new AscFormat.CShapeColor(rgba.R, rgba.G, rgba.B);
var rgb = _color1.lighten();
rgba = { R: rgb.r, G: rgb.g, B: rgb.b, A: rgba.A };
}
else if (mode == "lightenLess")
{
var _color1 = new CShapeColor(rgba.R, rgba.G, rgba.B);
var _color1 = new AscFormat.CShapeColor(rgba.R, rgba.G, rgba.B);
var rgb = _color1.lightenLess();
rgba = { R: rgb.r, G: rgb.g, B: rgb.b, A: rgba.A };
}
......@@ -1224,25 +1224,25 @@ CShapeDrawer.prototype =
var rgba = this.FillUniColor;
if (fill_mode == "darken")
{
var _color1 = new CShapeColor(rgba.R, rgba.G, rgba.B);
var _color1 = new AscFormat.CShapeColor(rgba.R, rgba.G, rgba.B);
var rgb = _color1.darken();
rgba = { R: rgb.r, G: rgb.g, B: rgb.b, A: rgba.A };
}
else if (fill_mode == "darkenLess")
{
var _color1 = new CShapeColor(rgba.R, rgba.G, rgba.B);
var _color1 = new AscFormat.CShapeColor(rgba.R, rgba.G, rgba.B);
var rgb = _color1.darkenLess();
rgba = { R: rgb.r, G: rgb.g, B: rgb.b, A: rgba.A };
}
else if (fill_mode == "lighten")
{
var _color1 = new CShapeColor(rgba.R, rgba.G, rgba.B);
var _color1 = new AscFormat.CShapeColor(rgba.R, rgba.G, rgba.B);
var rgb = _color1.lighten();
rgba = { R: rgb.r, G: rgb.g, B: rgb.b, A: rgba.A };
}
else if (fill_mode == "lightenLess")
{
var _color1 = new CShapeColor(rgba.R, rgba.G, rgba.B);
var _color1 = new AscFormat.CShapeColor(rgba.R, rgba.G, rgba.B);
var rgb = _color1.lightenLess();
rgba = { R: rgb.r, G: rgb.g, B: rgb.b, A: rgba.A };
}
......
......@@ -3,6 +3,8 @@
// Import
var getFullImageSrc2 = AscCommon.getFullImageSrc2;
var CShapeColor = AscFormat.CShapeColor;
var c_oAscFill = Asc.c_oAscFill;
window.IsShapeToImageConverter = false;
......
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