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
02e2c7b2
Kaydet (Commit)
02e2c7b2
authored
Tem 23, 2014
tarafından
Armin Le Grand
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
125300 enhanced handling of multiple ClipRegions in MetafileProcessor
üst
7fc27283
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
11 deletions
+54
-11
vclmetafileprocessor2d.cxx
drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+54
-11
No files found.
drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
Dosyayı görüntüle @
02e2c7b2
...
@@ -1744,17 +1744,52 @@ namespace drawinglayer
...
@@ -1744,17 +1744,52 @@ namespace drawinglayer
if
(
maClipPolyPolygon
.
count
())
if
(
maClipPolyPolygon
.
count
())
{
{
// there is already a clip polygon set; build clipped union of
// due to the cost of PolyPolygon clipping and numerical reasons try first if the current
// current mask polygon and new one
// and the new ClipRegion are ranges. If yes, processing can be simplified
maClipPolyPolygon
=
basegfx
::
tools
::
clipPolyPolygonOnPolyPolygon
(
if
(
basegfx
::
tools
::
isRectangle
(
aMask
)
aMask
,
&&
basegfx
::
tools
::
isRectangle
(
maClipPolyPolygon
))
maClipPolyPolygon
,
{
true
,
// #i106516# we want the inside of aMask, not the outside
// both ClipPolygons are rectangles
false
);
if
(
aMask
.
getB2DRange
().
equal
(
maClipPolyPolygon
.
getB2DRange
()))
{
// equal -> no change in ClipRegion needed, leave
// maClipPolyPolygon unchanged
}
else
{
// not equal -> create new ClipRegion from the two ranges
basegfx
::
B2DRange
aClipRange
(
aMask
.
getB2DRange
());
aClipRange
.
intersect
(
maClipPolyPolygon
.
getB2DRange
());
if
(
aClipRange
.
isEmpty
())
{
// no common ClipRegion -> set empty ClipRegion, no content to show
maClipPolyPolygon
.
clear
();
}
else
{
// use common ClipRegion as new ClipRegion
maClipPolyPolygon
=
basegfx
::
B2DPolyPolygon
(
basegfx
::
tools
::
createPolygonFromRect
(
aClipRange
));
}
}
}
else
{
// The current ClipRegion or the new one is not a rectangle;
// there is already a clip polygon set; build clipped union of
// current mask polygon and new one
maClipPolyPolygon
=
basegfx
::
tools
::
clipPolyPolygonOnPolyPolygon
(
aMask
,
maClipPolyPolygon
,
true
,
// #i106516# we want the inside of aMask, not the outside
false
);
}
}
}
else
else
{
{
// use
mask directly
// use
new mask directly as ClipRegion
maClipPolyPolygon
=
aMask
;
maClipPolyPolygon
=
aMask
;
}
}
...
@@ -1763,8 +1798,13 @@ namespace drawinglayer
...
@@ -1763,8 +1798,13 @@ namespace drawinglayer
// set VCL clip region; subdivide before conversion to tools polygon. Subdivision necessary (!)
// set VCL clip region; subdivide before conversion to tools polygon. Subdivision necessary (!)
// Removed subdivision and fixed in Region::ImplPolyPolyRegionToBandRegionFunc() in VCL where
// Removed subdivision and fixed in Region::ImplPolyPolyRegionToBandRegionFunc() in VCL where
// the ClipRegion is built from the Polygon. A AdaptiveSubdivide on the source polygon was missing there
// the ClipRegion is built from the Polygon. A AdaptiveSubdivide on the source polygon was missing there
mpOutputDevice
->
Push
(
PUSH_CLIPREGION
);
const
bool
bNewClipRegion
(
maClipPolyPolygon
!=
aLastClipPolyPolygon
);
mpOutputDevice
->
SetClipRegion
(
Region
(
maClipPolyPolygon
));
if
(
bNewClipRegion
)
{
mpOutputDevice
->
Push
(
PUSH_CLIPREGION
);
mpOutputDevice
->
SetClipRegion
(
Region
(
maClipPolyPolygon
));
}
// recursively paint content
// recursively paint content
// #121267# Only need to process sub-content when clip polygon is *not* empty.
// #121267# Only need to process sub-content when clip polygon is *not* empty.
...
@@ -1772,7 +1812,10 @@ namespace drawinglayer
...
@@ -1772,7 +1812,10 @@ namespace drawinglayer
process
(
rMaskCandidate
.
getChildren
());
process
(
rMaskCandidate
.
getChildren
());
// restore VCL clip region
// restore VCL clip region
mpOutputDevice
->
Pop
();
if
(
bNewClipRegion
)
{
mpOutputDevice
->
Pop
();
}
}
}
// restore to rescued clip polygon
// restore to rescued clip polygon
...
...
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