Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
172acd5b
Kaydet (Commit)
172acd5b
authored
Kas 22, 2013
tarafından
Jan Holesovsky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
EMF+: Small cleanup & more logging in preparation for line starts & ends.
Change-Id: I584f8a1680c6aa7b51b948a00213c285387b77c3
üst
40977516
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
19 deletions
+44
-19
implrenderer.hxx
cppcanvas/source/inc/implrenderer.hxx
+1
-1
emfplus.cxx
cppcanvas/source/mtfrenderer/emfplus.cxx
+43
-18
No files found.
cppcanvas/source/inc/implrenderer.hxx
Dosyayı görüntüle @
172acd5b
...
...
@@ -280,7 +280,7 @@ static float GetSwapFloat( SvStream& rSt )
/* EMF+ */
void
processEMFPlus
(
MetaCommentAction
*
pAct
,
const
ActionFactoryParameters
&
rFactoryParms
,
OutDevState
&
rState
,
const
CanvasSharedPtr
&
rCanvas
);
double
setFont
(
sal_uInt8
objectId
,
const
ActionFactoryParameters
&
rParms
,
OutDevState
&
rState
);
void
EMFPPlusDrawPolygon
(
::
basegfx
::
B2DPolyPolygon
&
polygon
,
const
ActionFactoryParameters
&
rParms
,
OutDevState
&
rState
,
const
CanvasSharedPtr
&
rCanvas
,
sal_uInt32
penIndex
);
void
EMFPPlusDrawPolygon
(
const
::
basegfx
::
B2DPolyPolygon
&
polygon
,
const
ActionFactoryParameters
&
rParms
,
OutDevState
&
rState
,
const
CanvasSharedPtr
&
rCanvas
,
sal_uInt32
penIndex
);
void
EMFPPlusFillPolygon
(
::
basegfx
::
B2DPolyPolygon
&
polygon
,
const
ActionFactoryParameters
&
rParms
,
OutDevState
&
rState
,
const
CanvasSharedPtr
&
rCanvas
,
bool
isColor
,
sal_uInt32
brushIndexOrColor
);
ActionVector
maActions
;
...
...
cppcanvas/source/mtfrenderer/emfplus.cxx
Dosyayı görüntüle @
172acd5b
...
...
@@ -28,6 +28,7 @@
#include <basegfx/vector/b2dsize.hxx>
#include <basegfx/range/b2drange.hxx>
#include <basegfx/range/b2drectangle.hxx>
#include <basegfx/polygon/b2dlinegeometry.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
...
...
@@ -625,7 +626,7 @@ namespace cppcanvas
delete
[]
customEndCap
;
}
void
SetStroke
Attributes
(
rendering
::
StrokeAttributes
&
rStrokeAttributes
,
ImplRenderer
&
rR
,
const
OutDevState
&
rState
)
void
SetStroke
Width
(
rendering
::
StrokeAttributes
&
rStrokeAttributes
,
ImplRenderer
&
rR
,
const
OutDevState
&
rState
)
{
#if OSL_DEBUG_LEVEL > 1
if
(
width
==
0.0
)
{
...
...
@@ -633,8 +634,10 @@ namespace cppcanvas
}
#endif
rStrokeAttributes
.
StrokeWidth
=
fabs
((
rState
.
mapModeTransform
*
rR
.
MapSize
(
width
==
0.0
?
0.05
:
width
,
0
)).
getX
());
}
// set dashing
void
SetStrokeDashing
(
rendering
::
StrokeAttributes
&
rStrokeAttributes
)
{
if
(
dashStyle
!=
EmfPlusLineStyleSolid
)
{
const
float
dash
[]
=
{
3
,
3
};
...
...
@@ -678,12 +681,18 @@ namespace cppcanvas
s
>>
transformation
;
if
(
penFlags
&
2
)
{
s
>>
startCap
;
SAL_INFO
(
"cppcanvas.emf"
,
"EMF+
\t\t
startCap: 0x"
<<
std
::
hex
<<
startCap
);
}
else
startCap
=
0
;
if
(
penFlags
&
4
)
{
s
>>
endCap
;
SAL_INFO
(
"cppcanvas.emf"
,
"EMF+
\t\t
endCap: 0x"
<<
std
::
hex
<<
endCap
);
}
else
endCap
=
0
;
...
...
@@ -749,24 +758,38 @@ namespace cppcanvas
}
else
compoundArrayLen
=
0
;
if
(
penFlags
&
2048
)
{
if
(
penFlags
&
2048
)
{
s
>>
customStartCapLen
;
SAL_INFO
(
"cppcanvas.emf"
,
"EMF+
\t\t
customStartCapLen: "
<<
customStartCapLen
);
if
(
customStartCapLen
<
0
)
customStartCapLen
=
0
;
customStartCap
=
new
sal_uInt8
[
customStartCapLen
];
for
(
i
=
0
;
i
<
customStartCapLen
;
i
++
)
{
s
>>
customStartCap
[
i
];
}
else
SAL_INFO
(
"cppcanvas.emf"
,
"EMF+
\t\t\t
customStartCap["
<<
i
<<
"]: 0x"
<<
std
::
hex
<<
int
(
customStartCap
[
i
]));
}
}
else
customStartCapLen
=
0
;
if
(
penFlags
&
4096
)
{
if
(
penFlags
&
4096
)
{
s
>>
customEndCapLen
;
SAL_INFO
(
"cppcanvas.emf"
,
"EMF+
\t\t
customEndCapLen: "
<<
customEndCapLen
);
if
(
customEndCapLen
<
0
)
customEndCapLen
=
0
;
customEndCap
=
new
sal_uInt8
[
customEndCapLen
];
for
(
i
=
0
;
i
<
customEndCapLen
;
i
++
)
{
s
>>
customEndCap
[
i
];
}
else
SAL_INFO
(
"cppcanvas.emf"
,
"EMF+
\t\t\t
customEndCap["
<<
i
<<
"]: 0x"
<<
std
::
hex
<<
int
(
customEndCap
[
i
]));
}
}
else
customEndCapLen
=
0
;
EMFPBrush
::
Read
(
s
,
rR
);
...
...
@@ -1151,7 +1174,7 @@ namespace cppcanvas
}
}
void
ImplRenderer
::
EMFPPlusDrawPolygon
(
::
basegfx
::
B2DPolyPolygon
&
polygon
,
const
ActionFactoryParameters
&
rParms
,
void
ImplRenderer
::
EMFPPlusDrawPolygon
(
const
::
basegfx
::
B2DPolyPolygon
&
polygon
,
const
ActionFactoryParameters
&
rParms
,
OutDevState
&
rState
,
const
CanvasSharedPtr
&
rCanvas
,
sal_uInt32
penIndex
)
{
EMFPPen
*
pen
=
(
EMFPPen
*
)
aObjects
[
penIndex
&
0xff
];
...
...
@@ -1165,22 +1188,24 @@ namespace cppcanvas
rState
.
lineColor
=
::
vcl
::
unotools
::
colorToDoubleSequence
(
pen
->
GetColor
(),
rCanvas
->
getUNOCanvas
()
->
getDevice
()
->
getDeviceColorSpace
());
polygon
.
transform
(
rState
.
mapModeTransform
);
rendering
::
StrokeAttributes
aStrokeAttributes
;
basegfx
::
B2DPolyPolygon
aPolyPolygon
(
polygon
);
aPolyPolygon
.
transform
(
rState
.
mapModeTransform
);
rendering
::
StrokeAttributes
aCommonAttributes
;
pen
->
SetStrokeAttributes
(
aStrokeAttributes
,
*
this
,
rState
);
// some attributes are common for the polygon, and the line
// starts & ends - like the stroke width
pen
->
SetStrokeWidth
(
aCommonAttributes
,
*
this
,
rState
);
ActionSharedPtr
pPolyAction
(
internal
::
PolyPolyActionFactory
::
createPolyPolyAction
(
polygon
,
rParms
.
mrCanvas
,
rState
,
aStrokeAttributes
)
);
// but eg. dashing has to be additionally set only on the
// polygon
rendering
::
StrokeAttributes
aPolygonAttributes
(
aCommonAttributes
);
pen
->
SetStrokeDashing
(
aPolygonAttributes
);
// render the polygon
ActionSharedPtr
pPolyAction
(
internal
::
PolyPolyActionFactory
::
createPolyPolyAction
(
aPolyPolygon
,
rParms
.
mrCanvas
,
rState
,
aPolygonAttributes
));
if
(
pPolyAction
)
{
maActions
.
push_back
(
MtfAction
(
pPolyAction
,
rParms
.
mrCurrActionIndex
)
);
maActions
.
push_back
(
MtfAction
(
pPolyAction
,
rParms
.
mrCurrActionIndex
));
rParms
.
mrCurrActionIndex
+=
pPolyAction
->
getActionCount
()
-
1
;
}
}
...
...
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