diff options
author | Armin Le Grand <alg@apache.org> | 2012-10-26 11:00:48 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-06-12 15:38:50 +0100 |
commit | 70e3eb2c1762fb1ca097cf671e3c7ce3d0dfd1b7 (patch) | |
tree | 80ec388e04d6fa22e19c8ba5329cab9f2068c666 /include | |
parent | a70233e991619e134fde2c5ff6037960d07a06ae (diff) |
Resolves: #i121267# added support for taking clipping into account...
for metafile-based exporters to vector formats
(cherry picked from commit 229a79b97110c11ef21b7b99ffc768254ca01d96)
Conflicts:
basegfx/inc/basegfx/polygon/b2dpolypolygontools.hxx
filter/source/flash/swfexporter.cxx
filter/source/graphicfilter/eos2met/eos2met.cxx
svtools/source/filter/wmf/wmf.cxx
vcl/Package_inc.mk
Remove unused variable to prevent compile warnings.
(cherry picked from commit 60d19c1602e4fec740624fd20a7bfd39707297e4)
Change-Id: Iaeb02d7321bea2890cf4e969f1d45d58deef5584
106285f06a21f4f39f34c6755d12ac6cd4196a7f
Diffstat (limited to 'include')
-rw-r--r-- | include/basegfx/polygon/b2dpolypolygontools.hxx | 6 | ||||
-rw-r--r-- | include/vcl/gdimetafiletools.hxx | 43 |
2 files changed, 49 insertions, 0 deletions
diff --git a/include/basegfx/polygon/b2dpolypolygontools.hxx b/include/basegfx/polygon/b2dpolypolygontools.hxx index 29ae3e042133..01c1306de82d 100644 --- a/include/basegfx/polygon/b2dpolypolygontools.hxx +++ b/include/basegfx/polygon/b2dpolypolygontools.hxx @@ -78,6 +78,12 @@ namespace basegfx */ BASEGFX_DLLPUBLIC B2DRange getRange(const B2DPolyPolygon& rCandidate); + // get signed area of polygon + BASEGFX_DLLPUBLIC double getSignedArea(const B2DPolyPolygon& rCandidate); + + // get area of polygon + BASEGFX_DLLPUBLIC double getArea(const B2DPolyPolygon& rCandidate); + /** Apply given LineDashing to given polyPolygon For a description see applyLineDashing in b2dpolygontoos.hxx diff --git a/include/vcl/gdimetafiletools.hxx b/include/vcl/gdimetafiletools.hxx new file mode 100644 index 000000000000..f6f3cfd870a2 --- /dev/null +++ b/include/vcl/gdimetafiletools.hxx @@ -0,0 +1,43 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef _SV_GDIMETAFILETOOLS_HXX +#define _SV_GDIMETAFILETOOLS_HXX + +#include <vcl/gdimtf.hxx> + +////////////////////////////////////////////////////////////////////////////// +// #i121267# Added tooling to be able to support old exporters which are based on +// metafiles as graphic content, but do not implement using the contained clip +// regions. +// The given metafile will internall yclip it's graphic content against the +// included clip regions so that it is safe to ignore clip actions there. This +// is not done completely, but implemented and extended as needed (on demand) +// since all this is a workarund; the better and long term solution will be to +// reimplement these im/exports to use primitives and not metafiles as bese +// information. + +void VCL_DLLPUBLIC clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource); + +////////////////////////////////////////////////////////////////////////////// +// Allow to check if a Metafile contains clipping or not + +bool VCL_DLLPUBLIC usesClipActions(const GDIMetaFile& rSource); + +////////////////////////////////////////////////////////////////////////////// + +#endif // _SV_GDIMETAFILETOOLS_HXX |