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
da09115c
Kaydet (Commit)
da09115c
authored
Ock 10, 2013
tarafından
Radek Doulik
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
implemented EmfPlusRecordTypeFillPie record
Change-Id: I15e7464a6a295bb4c1313c0a65ee33b6443c61c8
üst
2c403c7f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
emfplus.cxx
cppcanvas/source/mtfrenderer/emfplus.cxx
+45
-0
No files found.
cppcanvas/source/mtfrenderer/emfplus.cxx
Dosyayı görüntüle @
da09115c
...
...
@@ -29,6 +29,7 @@
#include <basegfx/range/b2drange.hxx>
#include <basegfx/range/b2drectangle.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <vcl/canvastools.hxx>
...
...
@@ -52,6 +53,7 @@
#define EmfPlusRecordTypeFillRects 16394
#define EmfPlusRecordTypeFillPolygon 16396
#define EmfPlusRecordTypeDrawLines 16397
#define EmfPlusRecordTypeFillPie 16400
#define EmfPlusRecordTypeFillPath 16404
#define EmfPlusRecordTypeDrawPath 16405
#define EmfPlusRecordTypeDrawImage 16410
...
...
@@ -93,6 +95,7 @@
#endif
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
basegfx
;
namespace
cppcanvas
{
...
...
@@ -1234,6 +1237,48 @@ namespace cppcanvas
case
EmfPlusRecordTypeObject
:
processObjectRecord
(
rMF
,
flags
);
break
;
case
EmfPlusRecordTypeFillPie
:
{
sal_uInt32
brushIndexOrColor
;
float
startAngle
,
sweepAngle
;
rMF
>>
brushIndexOrColor
>>
startAngle
>>
sweepAngle
;
EMFP_DEBUG
(
printf
(
"EMF+ FillPie colorOrIndex: %x startAngle: %f sweepAngle: %f
\n
"
,
(
unsigned
int
)
brushIndexOrColor
,
startAngle
,
sweepAngle
));
float
dx
,
dy
,
dw
,
dh
;
ReadRectangle
(
rMF
,
dx
,
dy
,
dw
,
dh
,
flags
&
0x4000
);
EMFP_DEBUG
(
printf
(
"EMF+ RectData: %f,%f %fx%f
\n
"
,
dx
,
dy
,
dw
,
dh
));
startAngle
=
2
*
M_PI
*
startAngle
/
360
;
sweepAngle
=
2
*
M_PI
*
sweepAngle
/
360
;
B2DPoint
mappedCenter
(
Map
(
dx
+
dw
/
2
,
dy
+
dh
/
2
));
B2DSize
mappedSize
(
MapSize
(
dw
/
2
,
dh
/
2
));
double
endAngle
=
startAngle
+
sweepAngle
;
if
(
endAngle
<
0
)
endAngle
+=
M_PI
*
2
;
endAngle
=
fmod
(
endAngle
,
M_PI
*
2
);
if
(
sweepAngle
<
0
)
{
double
tmp
=
startAngle
;
startAngle
=
endAngle
;
endAngle
=
tmp
;
}
EMFP_DEBUG
(
printf
(
"EMF+ angles: %f,%f ---> %f,%f
\n
"
,
startAngle
,
sweepAngle
,
startAngle
,
endAngle
));
B2DPolygon
polygon
=
tools
::
createPolygonFromEllipseSegment
(
mappedCenter
,
mappedSize
.
getX
(),
mappedSize
.
getY
(),
startAngle
,
endAngle
);
polygon
.
append
(
mappedCenter
);
polygon
.
setClosed
(
true
);
B2DPolyPolygon
polyPolygon
(
polygon
);
EMFPPlusFillPolygon
(
polyPolygon
,
rFactoryParms
,
rState
,
rCanvas
,
flags
&
0x8000
,
brushIndexOrColor
);
}
break
;
case
EmfPlusRecordTypeFillPath
:
{
sal_uInt32
index
=
flags
&
0xff
;
...
...
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