summaryrefslogtreecommitdiff
path: root/svgio/inc
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2024-10-02 13:07:47 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2024-10-02 14:31:47 +0200
commit16684eb4baab740fddc443490b19bf64af2be8e3 (patch)
tree895b2194db85a497e6b5a1d6edfaafe21c079dfc /svgio/inc
parent4dfffddceb12fe25ac3dd97281c3006502e04934 (diff)
tdf#163212: context-fill/context-stroke can also use gradients
Change-Id: Ic6f7f5e0817d8f5fccee64938004aa899bde47dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174382 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
Diffstat (limited to 'svgio/inc')
-rw-r--r--svgio/inc/svgmarkernode.hxx4
-rw-r--r--svgio/inc/svgstyleattributes.hxx15
2 files changed, 14 insertions, 5 deletions
diff --git a/svgio/inc/svgmarkernode.hxx b/svgio/inc/svgmarkernode.hxx
index b8fa7c000e68..489387dc07e7 100644
--- a/svgio/inc/svgmarkernode.hxx
+++ b/svgio/inc/svgmarkernode.hxx
@@ -60,6 +60,8 @@ namespace svgio::svgreader
double mfAngle;
MarkerOrient maMarkerOrient;
+ const SvgStyleAttributes* maContextStyleAttibutes;
+
public:
SvgMarkerNode(
SvgDocument& rDocument,
@@ -106,6 +108,8 @@ namespace svgio::svgreader
MarkerOrient getMarkerOrient() const { return maMarkerOrient; }
void setMarkerOrient(const MarkerOrient aMarkerOrient) { maMarkerOrient = aMarkerOrient; }
+ const SvgStyleAttributes* getContextStyleAttributes() const { return maContextStyleAttibutes; }
+ void setContextStyleAttributes(const SvgStyleAttributes* aContextStyleAttibutes) { maContextStyleAttibutes = aContextStyleAttibutes; }
};
} // end of namespace svgio::svgreader
diff --git a/svgio/inc/svgstyleattributes.hxx b/svgio/inc/svgstyleattributes.hxx
index 6c2b550381a0..9a9eccb55105 100644
--- a/svgio/inc/svgstyleattributes.hxx
+++ b/svgio/inc/svgstyleattributes.hxx
@@ -248,18 +248,21 @@ namespace svgio::svgreader
bool mbStrokeDasharraySet : 1;
// tdf#155651 Defines if 'context-fill' is used in fill
- bool mbContextFill : 1;
+ bool mbUseFillFromContextFill : 1;
+
+ // tdf#155651 Defines if 'context-stroke' is used in fill
+ bool mbUseFillFromContextStroke : 1;
+
+ // tdf#155651 Defines if 'context-fill' is used in stroke
+ bool mbUseStrokeFromContextFill : 1;
// tdf#155651 Defines if 'context-stroke' is used in stroke
- bool mbContextStroke : 1;
+ bool mbUseStrokeFromContextStroke : 1;
// tdf#94765 Check id references in gradient/pattern getters
OUString maNodeFillURL;
OUString maNodeStrokeURL;
- const basegfx::BColor* maContextFill;
- const basegfx::BColor* maContextStroke;
-
/// internal helpers
void add_fillGradient(
const basegfx::B2DPolyPolygon& rPath,
@@ -320,6 +323,8 @@ namespace svgio::svgreader
void readCssStyle(std::u16string_view rCandidate);
const SvgStyleAttributes* getCssStyleOrParentStyle() const;
+ const SvgMarkerNode* getMarkerParentNode() const;
+
SvgStyleAttributes(SvgNode& rOwner);
~SvgStyleAttributes();