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
247d5bc4
Kaydet (Commit)
247d5bc4
authored
Tem 03, 2014
tarafından
Armin Le Grand
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
i124852 Corrected mask and clip polygons for userSpaceOnUse
üst
131669af
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
8 deletions
+39
-8
svgclippathnode.hxx
svgio/inc/svgio/svgreader/svgclippathnode.hxx
+4
-2
svgmasknode.hxx
svgio/inc/svgio/svgreader/svgmasknode.hxx
+4
-2
svgclippathnode.cxx
svgio/source/svgreader/svgclippathnode.cxx
+11
-1
svgmasknode.cxx
svgio/source/svgreader/svgmasknode.cxx
+16
-1
svgstyleattributes.cxx
svgio/source/svgreader/svgstyleattributes.cxx
+4
-2
No files found.
svgio/inc/svgio/svgreader/svgclippathnode.hxx
Dosyayı görüntüle @
247d5bc4
...
@@ -52,8 +52,10 @@ namespace svgio
...
@@ -52,8 +52,10 @@ namespace svgio
virtual
void
parseAttribute
(
const
rtl
::
OUString
&
rTokenName
,
SVGToken
aSVGToken
,
const
rtl
::
OUString
&
aContent
);
virtual
void
parseAttribute
(
const
rtl
::
OUString
&
rTokenName
,
SVGToken
aSVGToken
,
const
rtl
::
OUString
&
aContent
);
virtual
void
decomposeSvgNode
(
drawinglayer
::
primitive2d
::
Primitive2DSequence
&
rTarget
,
bool
bReferenced
)
const
;
virtual
void
decomposeSvgNode
(
drawinglayer
::
primitive2d
::
Primitive2DSequence
&
rTarget
,
bool
bReferenced
)
const
;
/// apply contained clipPath to given geometry
/// apply contained clipPath to given geometry #i124852# transform may be needed
void
apply
(
drawinglayer
::
primitive2d
::
Primitive2DSequence
&
rTarget
)
const
;
void
apply
(
drawinglayer
::
primitive2d
::
Primitive2DSequence
&
rTarget
,
const
basegfx
::
B2DHomMatrix
*
pTransform
)
const
;
/// clipPathUnits content
/// clipPathUnits content
SvgUnits
getClipPathUnits
()
const
{
return
maClipPathUnits
;
}
SvgUnits
getClipPathUnits
()
const
{
return
maClipPathUnits
;
}
...
...
svgio/inc/svgio/svgreader/svgmasknode.hxx
Dosyayı görüntüle @
247d5bc4
...
@@ -57,8 +57,10 @@ namespace svgio
...
@@ -57,8 +57,10 @@ namespace svgio
virtual
void
parseAttribute
(
const
rtl
::
OUString
&
rTokenName
,
SVGToken
aSVGToken
,
const
rtl
::
OUString
&
aContent
);
virtual
void
parseAttribute
(
const
rtl
::
OUString
&
rTokenName
,
SVGToken
aSVGToken
,
const
rtl
::
OUString
&
aContent
);
virtual
void
decomposeSvgNode
(
drawinglayer
::
primitive2d
::
Primitive2DSequence
&
rTarget
,
bool
bReferenced
)
const
;
virtual
void
decomposeSvgNode
(
drawinglayer
::
primitive2d
::
Primitive2DSequence
&
rTarget
,
bool
bReferenced
)
const
;
/// apply contained clipPath to given geometry
/// apply contained clipPath to given geometry #i124852# transform may be needed
void
apply
(
drawinglayer
::
primitive2d
::
Primitive2DSequence
&
rTarget
)
const
;
void
apply
(
drawinglayer
::
primitive2d
::
Primitive2DSequence
&
rTarget
,
const
basegfx
::
B2DHomMatrix
*
pTransform
)
const
;
/// x content, set if found in current context
/// x content, set if found in current context
const
SvgNumber
&
getX
()
const
{
return
maX
;
}
const
SvgNumber
&
getX
()
const
{
return
maX
;
}
...
...
svgio/source/svgreader/svgclippathnode.cxx
Dosyayı görüntüle @
247d5bc4
...
@@ -132,7 +132,9 @@ namespace svgio
...
@@ -132,7 +132,9 @@ namespace svgio
}
}
}
}
void
SvgClipPathNode
::
apply
(
drawinglayer
::
primitive2d
::
Primitive2DSequence
&
rContent
)
const
void
SvgClipPathNode
::
apply
(
drawinglayer
::
primitive2d
::
Primitive2DSequence
&
rContent
,
const
basegfx
::
B2DHomMatrix
*
pTransform
)
const
{
{
if
(
rContent
.
hasElements
()
&&
Display_none
!=
getDisplay
())
if
(
rContent
.
hasElements
()
&&
Display_none
!=
getDisplay
())
{
{
...
@@ -179,6 +181,14 @@ namespace svgio
...
@@ -179,6 +181,14 @@ namespace svgio
aContentRange
.
getRange
(),
aContentRange
.
getRange
(),
aContentRange
.
getMinimum
()));
aContentRange
.
getMinimum
()));
}
}
else
// userSpaceOnUse
{
// #i124852#
if
(
pTransform
)
{
aClipPolyPolygon
.
transform
(
*
pTransform
);
}
}
// #124313# try to avoid creating an embedding to a MaskPrimitive2D if
// #124313# try to avoid creating an embedding to a MaskPrimitive2D if
// possible; MaskPrimitive2D processing is potentially expensive
// possible; MaskPrimitive2D processing is potentially expensive
...
...
svgio/source/svgreader/svgmasknode.cxx
Dosyayı görüntüle @
247d5bc4
...
@@ -197,7 +197,9 @@ namespace svgio
...
@@ -197,7 +197,9 @@ namespace svgio
}
}
}
}
void
SvgMaskNode
::
apply
(
drawinglayer
::
primitive2d
::
Primitive2DSequence
&
rTarget
)
const
void
SvgMaskNode
::
apply
(
drawinglayer
::
primitive2d
::
Primitive2DSequence
&
rTarget
,
const
basegfx
::
B2DHomMatrix
*
pTransform
)
const
{
{
if
(
rTarget
.
hasElements
()
&&
Display_none
!=
getDisplay
())
if
(
rTarget
.
hasElements
()
&&
Display_none
!=
getDisplay
())
{
{
...
@@ -259,6 +261,19 @@ namespace svgio
...
@@ -259,6 +261,19 @@ namespace svgio
aMaskTarget
=
drawinglayer
::
primitive2d
::
Primitive2DSequence
(
&
xTransform
,
1
);
aMaskTarget
=
drawinglayer
::
primitive2d
::
Primitive2DSequence
(
&
xTransform
,
1
);
}
}
else
// userSpaceOnUse
{
// #i124852#
if
(
pTransform
)
{
const
drawinglayer
::
primitive2d
::
Primitive2DReference
xTransform
(
new
drawinglayer
::
primitive2d
::
TransformPrimitive2D
(
*
pTransform
,
aMaskTarget
));
aMaskTarget
=
drawinglayer
::
primitive2d
::
Primitive2DSequence
(
&
xTransform
,
1
);
}
}
// embed content to a ModifiedColorPrimitive2D since the definitions
// embed content to a ModifiedColorPrimitive2D since the definitions
// how content is used as alpha is special for Svg
// how content is used as alpha is special for Svg
...
...
svgio/source/svgreader/svgstyleattributes.cxx
Dosyayı görüntüle @
247d5bc4
...
@@ -1130,7 +1130,8 @@ namespace svgio
...
@@ -1130,7 +1130,8 @@ namespace svgio
if
(
mpClip
)
if
(
mpClip
)
{
{
mpClip
->
apply
(
aSource
);
// #i124852# transform may be needed when userSpaceOnUse
mpClip
->
apply
(
aSource
,
pTransform
);
}
}
}
}
...
@@ -1143,7 +1144,8 @@ namespace svgio
...
@@ -1143,7 +1144,8 @@ namespace svgio
if
(
mpMask
)
if
(
mpMask
)
{
{
mpMask
->
apply
(
aSource
);
// #i124852# transform may be needed when userSpaceOnUse
mpMask
->
apply
(
aSource
,
pTransform
);
}
}
}
}
...
...
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