summaryrefslogtreecommitdiff
path: root/include/docmodel
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2023-02-24 00:48:55 +0900
committerTomaž Vajngerl <quikee@gmail.com>2023-03-23 02:28:08 +0000
commit0d18262789fbe95eafe32bd775a9827ed99685ef (patch)
tree3c47e89b85c882fb10f714ecd34cf7758912203e /include/docmodel
parent27f9a9cfa76fa584477e89f13b33720b5edbd570 (diff)
oox: import gradient fill to model::FormatScheme
Change-Id: I90bc7cf4239f08efbc7239928c34ccdbec20cb2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147575 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include/docmodel')
-rw-r--r--include/docmodel/theme/FormatScheme.hxx46
1 files changed, 46 insertions, 0 deletions
diff --git a/include/docmodel/theme/FormatScheme.hxx b/include/docmodel/theme/FormatScheme.hxx
index a256532791d9..39fa5d36ae0b 100644
--- a/include/docmodel/theme/FormatScheme.hxx
+++ b/include/docmodel/theme/FormatScheme.hxx
@@ -159,6 +159,52 @@ public:
}
};
+class DOCMODEL_DLLPUBLIC GradientStop
+{
+public:
+ double mfPosition = 0.0; // 0.0 - 1.0
+ ColorDefinition maColor;
+};
+
+enum class GradientType
+{
+ Undefined,
+ Linear,
+ Circle,
+ Rectangle,
+ Shape,
+};
+
+struct DOCMODEL_DLLPUBLIC LinearGradientProperties
+{
+ sal_Int32 mnAngle = 0;
+ bool mbScaled = false;
+};
+
+struct DOCMODEL_DLLPUBLIC RelativeRectangle
+{
+ sal_Int32 mnLeft = 0;
+ sal_Int32 mnTop = 0;
+ sal_Int32 mnRight = 0;
+ sal_Int32 mnBottom = 0;
+};
+
+class DOCMODEL_DLLPUBLIC GradientFill : public Fill
+{
+public:
+ bool mbRotateWithShape = false;
+ GradientType meGradientType = GradientType::Undefined;
+ std::vector<GradientStop> maGradientStops;
+ LinearGradientProperties maLinearGradient;
+ RelativeRectangle maFillToRectangle;
+ RelativeRectangle maTileRectangle;
+
+ GradientFill()
+ : Fill(FillType::Gradient)
+ {
+ }
+};
+
// Format Scheme
class DOCMODEL_DLLPUBLIC FillStyle