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
fa109b46
Kaydet (Commit)
fa109b46
authored
Mar 15, 2013
tarafından
Radek Doulik
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
implemented EmfPlusRecordTypeDrawEllipse record
Change-Id: If8d7c210e437a041f3202c09f3d26d621b5af748
üst
079b16d0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
33 deletions
+47
-33
implrenderer.hxx
cppcanvas/source/inc/implrenderer.hxx
+1
-0
emfplus.cxx
cppcanvas/source/mtfrenderer/emfplus.cxx
+46
-33
No files found.
cppcanvas/source/inc/implrenderer.hxx
Dosyayı görüntüle @
fa109b46
...
...
@@ -264,6 +264,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
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 @
fa109b46
...
...
@@ -1096,6 +1096,41 @@ namespace cppcanvas
}
}
void
ImplRenderer
::
EMFPPlusDrawPolygon
(
::
basegfx
::
B2DPolyPolygon
&
polygon
,
const
ActionFactoryParameters
&
rParms
,
OutDevState
&
rState
,
const
CanvasSharedPtr
&
rCanvas
,
sal_uInt32
penIndex
)
{
EMFPPen
*
pen
=
(
EMFPPen
*
)
aObjects
[
penIndex
&
0xff
];
SAL_WARN_IF
(
!
pen
,
"cppcanvas"
,
"emf+ missing pen"
);
if
(
pen
)
{
rState
.
isFillColorSet
=
false
;
rState
.
isLineColorSet
=
true
;
rState
.
lineColor
=
::
vcl
::
unotools
::
colorToDoubleSequence
(
pen
->
GetColor
(),
rCanvas
->
getUNOCanvas
()
->
getDevice
()
->
getDeviceColorSpace
());
polygon
.
transform
(
rState
.
mapModeTransform
);
rendering
::
StrokeAttributes
aStrokeAttributes
;
pen
->
SetStrokeAttributes
(
aStrokeAttributes
,
*
this
,
rState
);
ActionSharedPtr
pPolyAction
(
internal
::
PolyPolyActionFactory
::
createPolyPolyAction
(
polygon
,
rParms
.
mrCanvas
,
rState
,
aStrokeAttributes
)
);
if
(
pPolyAction
)
{
maActions
.
push_back
(
MtfAction
(
pPolyAction
,
rParms
.
mrCurrActionIndex
)
);
rParms
.
mrCurrActionIndex
+=
pPolyAction
->
getActionCount
()
-
1
;
}
}
}
void
ImplRenderer
::
processObjectRecord
(
SvMemoryStream
&
rObjectStream
,
sal_uInt16
flags
,
sal_uInt32
dataSize
,
sal_Bool
bUseWholeStream
)
{
sal_uInt32
index
;
...
...
@@ -1298,13 +1333,15 @@ namespace cppcanvas
EMFPPlusFillPolygon
(((
EMFPPath
*
)
aObjects
[
index
])
->
GetPolygon
(
*
this
),
rFactoryParms
,
rState
,
rCanvas
,
flags
&
0x8000
,
brushIndexOrColor
);
}
break
;
case
EmfPlusRecordTypeDrawEllipse
:
case
EmfPlusRecordTypeFillEllipse
:
{
sal_uInt32
brushIndexOrColor
;
rMF
>>
brushIndexOrColor
;
if
(
type
==
EmfPlusRecordTypeFillEllipse
)
rMF
>>
brushIndexOrColorOrPen
;
EMFP_DEBUG
(
printf
(
"EMF+
FillEllipse slot: %u
\n
"
,
static_cast
<
unsigned
>
(
flags
&
&
0xff
)));
EMFP_DEBUG
(
printf
(
"EMF+
%sEllipse slot: %u
\n
"
,
type
==
EmfPlusRecordTypeFillEllipse
?
"Fill"
:
"Draw"
,
static_cast
<
unsigned
>
(
flags
&
0xff
)));
float
dx
,
dy
,
dw
,
dh
;
...
...
@@ -1317,8 +1354,12 @@ namespace cppcanvas
::
basegfx
::
B2DPolyPolygon
polyPolygon
(
::
basegfx
::
B2DPolygon
(
::
basegfx
::
tools
::
createPolygonFromEllipse
(
mappedCenter
,
mappedSize
.
getX
(),
mappedSize
.
getY
()
)
)
);
EMFPPlusFillPolygon
(
polyPolygon
,
rFactoryParms
,
rState
,
rCanvas
,
flags
&
0x8000
,
brushIndexOrColor
);
if
(
type
==
EmfPlusRecordTypeFillEllipse
)
EMFPPlusFillPolygon
(
polyPolygon
,
rFactoryParms
,
rState
,
rCanvas
,
flags
&
0x8000
,
brushIndexOrColor
);
else
EMFPPlusDrawPolygon
(
polyPolygon
,
rFactoryParms
,
rState
,
rCanvas
,
flags
&
0xff
);
}
break
;
case
EmfPlusRecordTypeFillRects
:
...
...
@@ -1438,38 +1479,10 @@ namespace cppcanvas
EMFP_DEBUG
(
printf
(
"EMF+
\t
pen: %u
\n
"
,
(
unsigned
int
)
penIndex
));
EMFPPath
*
path
=
(
EMFPPath
*
)
aObjects
[
flags
&
0xff
];
EMFPPen
*
pen
=
(
EMFPPen
*
)
aObjects
[
penIndex
&
0xff
];
SAL_WARN_IF
(
!
pen
,
"cppcanvas"
,
"EmfPlusRecordTypeDrawPath missing pen"
);
SAL_WARN_IF
(
!
path
,
"cppcanvas"
,
"EmfPlusRecordTypeDrawPath missing path"
);
if
(
pen
&&
path
)
{
rState
.
isFillColorSet
=
false
;
rState
.
isLineColorSet
=
true
;
rState
.
lineColor
=
::
vcl
::
unotools
::
colorToDoubleSequence
(
pen
->
GetColor
(),
rCanvas
->
getUNOCanvas
()
->
getDevice
()
->
getDeviceColorSpace
());
::
basegfx
::
B2DPolyPolygon
&
polygon
(
path
->
GetPolygon
(
*
this
));
polygon
.
transform
(
rState
.
mapModeTransform
);
rendering
::
StrokeAttributes
aStrokeAttributes
;
pen
->
SetStrokeAttributes
(
aStrokeAttributes
,
*
this
,
rState
);
EMFPPlusDrawPolygon
(
path
->
GetPolygon
(
*
this
),
rFactoryParms
,
rState
,
rCanvas
,
penIndex
);
ActionSharedPtr
pPolyAction
(
internal
::
PolyPolyActionFactory
::
createPolyPolyAction
(
polygon
,
rFactoryParms
.
mrCanvas
,
rState
,
aStrokeAttributes
)
);
if
(
pPolyAction
)
{
maActions
.
push_back
(
MtfAction
(
pPolyAction
,
rFactoryParms
.
mrCurrActionIndex
)
);
rFactoryParms
.
mrCurrActionIndex
+=
pPolyAction
->
getActionCount
()
-
1
;
}
}
break
;
}
case
EmfPlusRecordTypeDrawImage
:
...
...
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