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
45ce1c7c
Commit
45ce1c7c
authored
Apr 19, 2016
by
Sergey Luzyanin
Committed by
Alexander.Trofimov
May 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Печать спарклайнов
parent
ef619df5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
27 deletions
+60
-27
common/Charts/DrawingObjects.js
common/Charts/DrawingObjects.js
+36
-27
word/Drawing/Metafile.js
word/Drawing/Metafile.js
+24
-0
No files found.
common/Charts/DrawingObjects.js
View file @
45ce1c7c
...
...
@@ -755,36 +755,22 @@ CSparklineView.prototype.draw = function(graphics, offX, offY)
this
.
chartSpace
.
transform
.
ty
=
this
.
chartSpace
.
y
;
}
}
//graphics.m_oCoordTransform.tx = x;
//graphics.m_oCoordTransform.ty = y;
/*var _l = this.chartSpace.chartObj.calcProp.chartGutter._left;
var _t = this.chartSpace.chartObj.calcProp.chartGutter._top;
var _r = this.chartSpace.chartObj.calcProp.chartGutter._right;
var _b = this.chartSpace.chartObj.calcProp.chartGutter._bottom;*/
var
_true_height
=
this
.
chartSpace
.
chartObj
.
calcProp
.
chartGutter
.
trueHeight
;
var
_true_width
=
this
.
chartSpace
.
chartObj
.
calcProp
.
chartGutter
.
trueWidht
;
var
tx
,
ty
,
sx
,
sy
,
oldExtX
,
oldExtY
;
var
_true_height
=
this
.
chartSpace
.
chartObj
.
calcProp
.
chartGutter
.
trueHeight
;
var
_true_width
=
this
.
chartSpace
.
chartObj
.
calcProp
.
chartGutter
.
trueWidht
;
this
.
chartSpace
.
chartObj
.
calcProp
.
trueWidht
=
this
.
chartSpace
.
extX
*
this
.
chartSpace
.
chartObj
.
calcProp
.
pxToMM
;
this
.
chartSpace
.
chartObj
.
calcProp
.
trueHeight
=
this
.
chartSpace
.
extY
*
this
.
chartSpace
.
chartObj
.
calcProp
.
pxToMM
;
/*this.chartSpace.chartObj.calcProp.chartGutter._left = 0;
this.chartSpace.chartObj.calcProp.chartGutter._top = 0;
this.chartSpace.chartObj.calcProp.chartGutter._right = 0;
this.chartSpace.chartObj.calcProp.chartGutter._bottom = 0;*/
this
.
chartSpace
.
draw
(
graphics
);
/*this.chartSpace.chartObj.calcProp.chartGutter._left = _l;
this.chartSpace.chartObj.calcProp.chartGutter._top = _t;
this.chartSpace.chartObj.calcProp.chartGutter._right = _r;
this.chartSpace.chartObj.calcProp.chartGutter._bottom = _b;*/
this
.
chartSpace
.
chartObj
.
calcProp
.
trueWidht
=
_true_width
;
this
.
chartSpace
.
chartObj
.
calcProp
.
trueHeight
=
_true_height
;
};
...
...
@@ -2536,7 +2522,7 @@ function DrawingObjects() {
var
graphics
,
i
,
j
;
if
(
oDrawingContext
instanceof
CPdfPrinter
)
{
graphics
=
oDrawingContext
;
graphics
=
oDrawingContext
.
DocumentRenderer
;
}
else
{
...
...
@@ -2565,10 +2551,33 @@ function DrawingObjects() {
if
(
!
oSparklineGroup
.
arrSparklines
[
j
].
checkInRange
(
range
))
{
continue
;
}
if
(
oDrawingContext
instanceof
CPdfPrinter
)
{
graphics
.
SaveGrState
();
var
_baseTransform
=
new
CMatrix
();
_baseTransform
.
sx
/=
nSparklineMultiplier
;
_baseTransform
.
sy
/=
nSparklineMultiplier
;
graphics
.
SetBaseTransform
(
_baseTransform
);
}
oSparklineGroup
.
arrCachedSparklines
[
j
].
draw
(
graphics
,
_offX
,
_offY
);
if
(
oDrawingContext
instanceof
CPdfPrinter
)
{
graphics
.
SetBaseTransform
(
null
);
graphics
.
RestoreGrState
();
}
}
}
oDrawingContext
.
restore
();
if
(
oDrawingContext
instanceof
CPdfPrinter
)
{
}
else
{
oDrawingContext
.
restore
();
}
};
_this
.
rebuildChartGraphicObjects
=
function
(
data
)
...
...
word/Drawing/Metafile.js
View file @
45ce1c7c
...
...
@@ -1490,10 +1490,16 @@ function CDocumentRenderer()
this
.
m_oTransform
=
null
;
this
.
_restoreDumpedVectors
=
null
;
this
.
m_oBaseTransform
=
null
;
}
CDocumentRenderer
.
prototype
=
{
SetBaseTransform
:
function
(
_matrix
)
{
this
.
m_oBaseTransform
=
_matrix
;
},
BeginPage
:
function
(
width
,
height
)
{
this
.
m_arrayPages
[
this
.
m_arrayPages
.
length
]
=
new
CMetafile
(
width
,
height
);
...
...
@@ -1543,7 +1549,22 @@ CDocumentRenderer.prototype =
transform
:
function
(
sx
,
shy
,
shx
,
sy
,
tx
,
ty
)
{
if
(
0
!=
this
.
m_lPagesCount
)
{
if
(
null
==
this
.
m_oBaseTransform
)
this
.
m_arrayPages
[
this
.
m_lPagesCount
-
1
].
transform
(
sx
,
shy
,
shx
,
sy
,
tx
,
ty
);
else
{
var
_transform
=
new
CMatrix
();
_transform
.
sx
=
sx
;
_transform
.
shy
=
shy
;
_transform
.
shx
=
shx
;
_transform
.
sy
=
sy
;
_transform
.
tx
=
tx
;
_transform
.
ty
=
ty
;
global_MatrixTransformer
.
MultiplyAppend
(
_transform
,
this
.
m_oBaseTransform
);
this
.
m_arrayPages
[
this
.
m_lPagesCount
-
1
].
transform
(
_transform
.
sx
,
_transform
.
shy
,
_transform
.
shx
,
_transform
.
sy
,
_transform
.
tx
,
_transform
.
ty
);
}
}
},
transform3
:
function
(
m
)
{
...
...
@@ -2106,7 +2127,10 @@ CDocumentRenderer.prototype =
},
RestoreGrState
:
function
()
{
var
_t
=
this
.
m_oBaseTransform
;
this
.
m_oBaseTransform
=
null
;
this
.
GrState
.
RestoreGrState
();
this
.
m_oBaseTransform
=
_t
;
},
StartClipPath
:
function
()
...
...
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