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
d45ec47e
Commit
d45ec47e
authored
Jun 03, 2016
by
Oleg Korshul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
line dash
parent
54e66ab2
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
2981 additions
and
2806 deletions
+2981
-2806
cell/graphics/pdfprinter.js
cell/graphics/pdfprinter.js
+4
-0
cell/model/DrawingObjects/Graphics.js
cell/model/DrawingObjects/Graphics.js
+8
-0
cell/model/DrawingObjects/ShapeDrawer.js
cell/model/DrawingObjects/ShapeDrawer.js
+10
-0
common/Drawings/CommonController.js
common/Drawings/CommonController.js
+3
-0
common/Drawings/Metafile.js
common/Drawings/Metafile.js
+2885
-2805
common/Drawings/TextDrawer.js
common/Drawings/TextDrawer.js
+3
-0
common/Overlay.js
common/Overlay.js
+4
-0
common/Shapes/Serialize.js
common/Shapes/Serialize.js
+34
-1
common/Shapes/SerializeWriter.js
common/Shapes/SerializeWriter.js
+11
-0
word/Drawing/Graphics.js
word/Drawing/Graphics.js
+9
-0
word/Drawing/ShapeDrawer.js
word/Drawing/ShapeDrawer.js
+10
-0
No files found.
cell/graphics/pdfprinter.js
View file @
d45ec47e
...
...
@@ -424,6 +424,10 @@ CPdfPrinter.prototype =
{
return
this
.
DocumentRenderer
.
p_width
(
w
);
},
p_dash
:
function
(
params
)
{
// TODO:
},
// brush methods
b_color1
:
function
(
r
,
g
,
b
,
a
)
{
...
...
cell/model/DrawingObjects/Graphics.js
View file @
d45ec47e
...
...
@@ -183,6 +183,14 @@ CGraphics.prototype =
}
}
},
p_dash
:
function
(
params
)
{
if
(
!
this
.
m_oContext
.
setLineDash
)
return
;
this
.
m_oContext
.
setLineDash
(
params
?
params
:
[]);
},
// brush methods
b_color1
:
function
(
r
,
g
,
b
,
a
)
{
...
...
cell/model/DrawingObjects/ShapeDrawer.js
View file @
d45ec47e
...
...
@@ -658,6 +658,14 @@ CShapeDrawer.prototype =
this
.
p_width
(
1000
*
this
.
StrokeWidth
);
if
(
this
.
Ln
.
prstDash
!=
null
&&
AscCommon
.
DashPatternPresets
[
this
.
Ln
.
prstDash
])
{
var
_arr
=
AscCommon
.
DashPatternPresets
[
this
.
Ln
.
prstDash
].
slice
();;
for
(
var
indexD
=
0
;
indexD
<
_arr
.
length
;
indexD
++
)
_arr
[
indexD
]
*=
this
.
StrokeWidth
;
this
.
Graphics
.
p_dash
(
_arr
);
}
if
(
graphics
.
IsSlideBoundsCheckerType
&&
!
this
.
bIsNoStrokeAttack
)
graphics
.
LineWidth
=
this
.
StrokeWidth
;
...
...
@@ -738,6 +746,8 @@ CShapeDrawer.prototype =
{
this
.
Graphics
.
m_oContext
.
globalCompositeOperation
=
_old_composite
;
}
this
.
Graphics
.
p_dash
(
null
);
},
p_width
:
function
(
w
)
...
...
common/Drawings/CommonController.js
View file @
d45ec47e
...
...
@@ -8126,6 +8126,9 @@ CSlideBoundsChecker.prototype =
p_width
:
function
(
w
)
{
},
p_dash
:
function
(
params
)
{
},
// brush methods
b_color1
:
function
(
r
,
g
,
b
,
a
)
{
...
...
common/Drawings/Metafile.js
View file @
d45ec47e
This source diff could not be displayed because it is too large. You can
view the blob
instead.
common/Drawings/TextDrawer.js
View file @
d45ec47e
...
...
@@ -931,6 +931,9 @@ CTextDrawer.prototype =
}
this
.
Get_PathToDraw
(
false
,
true
);
},
p_dash
:
function
(
w
)
{
},
// brush methods
b_color1
:
function
(
r
,
g
,
b
,
a
)
{
...
...
common/Overlay.js
View file @
d45ec47e
...
...
@@ -590,6 +590,10 @@ CAutoshapeTrack.prototype =
if
(
_EpsLine
>
this
.
MaxEpsLine
)
this
.
MaxEpsLine
=
_EpsLine
;
},
p_dash
:
function
(
params
)
{
this
.
Graphics
.
p_dash
(
params
);
},
b_color1
:
function
(
r
,
g
,
b
,
a
)
{
this
.
Graphics
.
b_color1
(
r
,
g
,
b
,
a
);
...
...
common/Shapes/Serialize.js
View file @
d45ec47e
...
...
@@ -2524,7 +2524,7 @@ function BinaryPPTYLoader()
}
case
1
:
{
s
.
SkipRecord
(
);
ln
.
setPrstDash
(
this
.
ReadLineDash
()
);
break
;
}
case
2
:
...
...
@@ -2594,6 +2594,39 @@ function BinaryPPTYLoader()
return
endL
;
}
this
.
ReadLineDash
=
function
()
{
var
s
=
this
.
stream
;
var
_rec_start
=
s
.
cur
;
var
_end_rec
=
_rec_start
+
s
.
GetLong
()
+
4
;
var
_dash
=
6
;
// solid
s
.
Skip2
(
1
);
// start attributes
while
(
true
)
{
var
_at
=
s
.
GetUChar
();
if
(
_at
==
g_nodeAttributeEnd
)
break
;
switch
(
_at
)
{
case
0
:
{
_dash
=
s
.
GetUChar
();
break
;
}
default
:
break
;
}
}
s
.
Seek2
(
_end_rec
);
return
_dash
;
}
this
.
ReadLineJoin
=
function
()
{
var
s
=
this
.
stream
;
...
...
common/Shapes/SerializeWriter.js
View file @
d45ec47e
...
...
@@ -2460,6 +2460,7 @@ function CBinaryFileWriter()
oThis
.
WriteUChar
(
g_nodeAttributeEnd
);
oThis
.
WriteRecord2
(
0
,
ln
.
Fill
,
oThis
.
WriteUniFill
);
oThis
.
WriteRecord2
(
1
,
ln
.
prstDash
,
oThis
.
WriteLineDash
);
oThis
.
WriteRecord1
(
2
,
ln
.
Join
,
oThis
.
WriteLineJoin
);
oThis
.
WriteRecord2
(
3
,
ln
.
headEnd
,
oThis
.
WriteLineEnd
);
oThis
.
WriteRecord2
(
4
,
ln
.
tailEnd
,
oThis
.
WriteLineEnd
);
...
...
@@ -2481,6 +2482,16 @@ function CBinaryFileWriter()
oThis
.
WriteUChar
(
g_nodeAttributeEnd
);
}
this
.
WriteLineDash
=
function
(
dash
)
{
if
(
dash
==
null
||
dash
===
undefined
)
return
;
oThis
.
WriteUChar
(
g_nodeAttributeStart
);
oThis
.
_WriteLimit2
(
0
,
dash
);
oThis
.
WriteUChar
(
g_nodeAttributeEnd
);
}
this
.
WriteLineEnd
=
function
(
end
)
{
oThis
.
WriteUChar
(
g_nodeAttributeStart
);
...
...
word/Drawing/Graphics.js
View file @
d45ec47e
...
...
@@ -207,6 +207,15 @@ CGraphics.prototype =
}
}
},
p_dash
:
function
(
params
)
{
if
(
!
this
.
m_oContext
.
setLineDash
)
return
;
this
.
m_oContext
.
setLineDash
(
params
?
params
:
[]);
},
// brush methods
b_color1
:
function
(
r
,
g
,
b
,
a
)
{
...
...
word/Drawing/ShapeDrawer.js
View file @
d45ec47e
...
...
@@ -630,6 +630,14 @@ CShapeDrawer.prototype =
this
.
StrokeWidth
/=
36000.0
;
this
.
p_width
(
1000
*
this
.
StrokeWidth
);
if
(
this
.
Ln
.
prstDash
!=
null
&&
AscCommon
.
DashPatternPresets
[
this
.
Ln
.
prstDash
])
{
var
_arr
=
AscCommon
.
DashPatternPresets
[
this
.
Ln
.
prstDash
].
slice
();;
for
(
var
indexD
=
0
;
indexD
<
_arr
.
length
;
indexD
++
)
_arr
[
indexD
]
*=
this
.
StrokeWidth
;
this
.
Graphics
.
p_dash
(
_arr
);
}
if
(
graphics
.
IsSlideBoundsCheckerType
&&
!
this
.
bIsNoStrokeAttack
)
graphics
.
LineWidth
=
this
.
StrokeWidth
;
...
...
@@ -699,6 +707,8 @@ CShapeDrawer.prototype =
{
this
.
Graphics
.
CorrectBounds2
();
}
this
.
Graphics
.
p_dash
(
null
);
},
p_width
:
function
(
w
)
...
...
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