diff options
author | Armin Le Grand <Armin.Le.Grand@me.com> | 2020-02-14 16:47:14 +0100 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@me.com> | 2020-02-14 19:19:49 +0100 |
commit | 62ac8333999c661432adb0a18245a399daa89dcb (patch) | |
tree | 9199e1e920765cc343646f472d7491f63d438a37 /include | |
parent | fd7749fddc5a767461dfced55369af48e5a6d561 (diff) |
tdf#130655 callback interface for 3D and secure dash
Added same interface for 3D but just for lines, it uses no
gaps. Added the security mechanism mentioned in the task
in comment (2) to 2D and 3D
Change-Id: I5da303c01562088682d95ee4f294c99e1f17bf6b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88728
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/basegfx/polygon/b2dpolygontools.hxx | 2 | ||||
-rw-r--r-- | include/basegfx/polygon/b3dpolygontools.hxx | 12 |
2 files changed, 11 insertions, 3 deletions
diff --git a/include/basegfx/polygon/b2dpolygontools.hxx b/include/basegfx/polygon/b2dpolygontools.hxx index 2ec15714088b..90001bae7131 100644 --- a/include/basegfx/polygon/b2dpolygontools.hxx +++ b/include/basegfx/polygon/b2dpolygontools.hxx @@ -216,7 +216,7 @@ namespace basegfx const ::std::vector<double>& rDotDashArray, B2DPolyPolygon* pLineTarget, B2DPolyPolygon* pGapTarget = nullptr, - double fFullDashDotLen = 0.0); + double fDotDashLength = 0.0); // test if point is inside epsilon-range around an edge defined // by the two given points. Can be used for HitTesting. The epsilon-range diff --git a/include/basegfx/polygon/b3dpolygontools.hxx b/include/basegfx/polygon/b3dpolygontools.hxx index 2e37b64e2516..80383c29625e 100644 --- a/include/basegfx/polygon/b3dpolygontools.hxx +++ b/include/basegfx/polygon/b3dpolygontools.hxx @@ -20,9 +20,11 @@ #ifndef INCLUDED_BASEGFX_POLYGON_B3DPOLYGONTOOLS_HXX #define INCLUDED_BASEGFX_POLYGON_B3DPOLYGONTOOLS_HXX +#include <vector> +#include <functional> + #include <basegfx/point/b3dpoint.hxx> #include <basegfx/vector/b3dvector.hxx> -#include <vector> #include <basegfx/basegfxdllapi.h> @@ -60,12 +62,18 @@ namespace basegfx /** Apply given LineDashing to given polygon For a description see applyLineDashing in b2dpolygontoos.hxx + Also 2nd version with callbacks, see comments in 2D version */ BASEGFX_DLLPUBLIC void applyLineDashing( const B3DPolygon& rCandidate, + const std::vector<double>& rDotDashArray, + std::function<void(const basegfx::B3DPolygon& rSnippet)> aLineTargetCallback, + double fDotDashLength = 0.0); + BASEGFX_DLLPUBLIC void applyLineDashing( + const B3DPolygon& rCandidate, const ::std::vector<double>& rDotDashArray, B3DPolyPolygon* pLineTarget, - double fFullDashDotLen); + double fDotDashLength = 0.0); /** Create/replace normals for given 3d geometry with default normals from given center to outside. rCandidate: the 3d geometry to change |