diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2020-10-15 09:38:56 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2020-10-18 21:20:40 +0200 |
commit | 52c2b0fefcd3743c266cccb321ae194fd00720a4 (patch) | |
tree | 96b1e786cdb1f2295d688b99f7ca5e45ae3540b3 /include/svx/sdr/overlay | |
parent | cf9dd0ab74db5e1f97c20737290a55a30a8738e5 (diff) |
sd: custom annotation marker and draw polygon annotation from PDF
This implements custom annotation marker, which overrides the
default marker drawing of comments in Draw/Impress. The
polygon is transported from the import of PDF to SdPdfFilter,
then the sd::Annotation is set-up, by settuing up the new class
CustomAnnotationMarker.
CustomAnnotationMarker also supports setting of the line color,
line width and fill color.
The OverlayPolyPolygon is the new class that is responsible for
the marker overlay, mainly to create the Primitive2D of the
marker, that will be shown on the screen.
This only implements Polygon PDF annotation sub-type.
Change-Id: Ic663c31c5b3db5c13179dde63c1a0b81159f4b80
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104365
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include/svx/sdr/overlay')
-rw-r--r-- | include/svx/sdr/overlay/overlaypolypolygon.hxx | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/include/svx/sdr/overlay/overlaypolypolygon.hxx b/include/svx/sdr/overlay/overlaypolypolygon.hxx index 4cb5c4610a00..d3aa2074d48f 100644 --- a/include/svx/sdr/overlay/overlaypolypolygon.hxx +++ b/include/svx/sdr/overlay/overlaypolypolygon.hxx @@ -25,7 +25,24 @@ namespace sdr::overlay - { +{ + class SVXCORE_DLLPUBLIC OverlayPolyPolygon final : public OverlayObject + { + private: + basegfx::B2DPolyPolygon maLinePolyPolygon; + double mfLineWidth; + Color maFillColor; + + virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override; + + public: + explicit OverlayPolyPolygon(const basegfx::B2DPolyPolygon& rLinePolyPolygon, + Color const & rLineColor, + double mfLineWidth, + Color const & rFillColor); + virtual ~OverlayPolyPolygon() override; + }; + class SVXCORE_DLLPUBLIC OverlayPolyPolygonStripedAndFilled final : public OverlayObject { // geometry |