tdf#85428: Clip strokes
Clip stroke paths coming from the PDF import. Similar to my previous patches for fills. (It's possible we might have to do something clever with cropping of arrows/etc but not sure yet) Change-Id: I9e46deac4a722e3ac510f0cc4bdb6b38b67c579e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176952 Tested-by: Jenkins Reviewed-by: David Gilbert <freedesktop@treblig.org>
This commit is contained in:
parent
4ffd1e31b1
commit
abfbca2719
1 changed files with 7 additions and 0 deletions
|
@ -452,8 +452,15 @@ void PDFIProcessor::tilingPatternFill(int nX0, int nY0, int nX1, int nY1,
|
||||||
void PDFIProcessor::strokePath( const uno::Reference< rendering::XPolyPolygon2D >& rPath )
|
void PDFIProcessor::strokePath( const uno::Reference< rendering::XPolyPolygon2D >& rPath )
|
||||||
{
|
{
|
||||||
basegfx::B2DPolyPolygon aPoly=basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(rPath);
|
basegfx::B2DPolyPolygon aPoly=basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(rPath);
|
||||||
|
basegfx::B2DPolyPolygon aCurClip = getCurrentContext().Clip;
|
||||||
aPoly.transform(getCurrentContext().Transformation);
|
aPoly.transform(getCurrentContext().Transformation);
|
||||||
|
|
||||||
|
if( aCurClip.count() ) {
|
||||||
|
aPoly = basegfx::utils::clipPolyPolygonOnPolyPolygon( aPoly, aCurClip,
|
||||||
|
true, /* bInside, keep parts inside the clip */
|
||||||
|
true /* bStroke, stroked */ );
|
||||||
|
}
|
||||||
|
|
||||||
PolyPolyElement* pPoly = ElementFactory::createPolyPolyElement(
|
PolyPolyElement* pPoly = ElementFactory::createPolyPolyElement(
|
||||||
m_pCurElement,
|
m_pCurElement,
|
||||||
getGCId(getCurrentContext()),
|
getGCId(getCurrentContext()),
|
||||||
|
|
Loading…
Reference in a new issue