Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
sdkjs
Commits
f076a885
Commit
f076a885
authored
Apr 22, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
common/Drawings/ColorArray to function-closure
parent
d5539409
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
12 deletions
+23
-12
build/configs/webexcel.json
build/configs/webexcel.json
+1
-1
build/configs/webpowerpoint.json
build/configs/webpowerpoint.json
+1
-1
build/configs/webword.json
build/configs/webword.json
+1
-1
cell/model/DrawingObjects/ShapeDrawer.js
cell/model/DrawingObjects/ShapeDrawer.js
+2
-0
common/Drawings/ColorArray.js
common/Drawings/ColorArray.js
+8
-1
common/Native/Wrappers/ShapeDrawer.js
common/Native/Wrappers/ShapeDrawer.js
+8
-8
word/Drawing/ShapeDrawer.js
word/Drawing/ShapeDrawer.js
+2
-0
No files found.
build/configs/webexcel.json
View file @
f076a885
...
...
@@ -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"
,
...
...
build/configs/webpowerpoint.json
View file @
f076a885
...
...
@@ -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"
,
...
...
build/configs/webword.json
View file @
f076a885
...
...
@@ -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"
,
...
...
cell/model/DrawingObjects/ShapeDrawer.js
View file @
f076a885
...
...
@@ -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
)
...
...
common/Drawings/ColorArray.js
View file @
f076a885
"
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
;
})();
common/Native/Wrappers/ShapeDrawer.js
View file @
f076a885
...
...
@@ -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
};
}
...
...
word/Drawing/ShapeDrawer.js
View file @
f076a885
...
...
@@ -3,6 +3,8 @@
// Import
var
getFullImageSrc2
=
AscCommon
.
getFullImageSrc2
;
var
CShapeColor
=
AscFormat
.
CShapeColor
;
var
c_oAscFill
=
Asc
.
c_oAscFill
;
window
.
IsShapeToImageConverter
=
false
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment