summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2021-12-18 23:39:25 +1100
committerTomaž Vajngerl <quikee@gmail.com>2022-01-05 05:42:32 +0100
commit22f52db0be81ceec2aa7a61f7092b54f36e2d00c (patch)
treef1f2a02824321d53f949146a480db12186ca45ee /include
parent88d8c9af7140ec25dfbcd9323b870a2da7b6f7e0 (diff)
vcl: migrate AddGradientActions() from OutputDevice to Gradient
Change-Id: I815fb3ce366c93b81f60d19eeed906dc7288708a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127030 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/vcl/gradient.hxx9
-rw-r--r--include/vcl/outdev.hxx10
2 files changed, 9 insertions, 10 deletions
diff --git a/include/vcl/gradient.hxx b/include/vcl/gradient.hxx
index 5a04616adda5..f7c2bd2ec5f9 100644
--- a/include/vcl/gradient.hxx
+++ b/include/vcl/gradient.hxx
@@ -33,6 +33,7 @@ namespace tools { class Rectangle; }
class Point;
class SvStream;
+class GDIMetaFile;
class VCL_DLLPUBLIC Gradient
{
@@ -78,11 +79,19 @@ public:
void GetBoundRect( const tools::Rectangle& rRect, tools::Rectangle &rBoundRect, Point& rCenter ) const;
+ void AddGradientActions(tools::Rectangle const& rRect, GDIMetaFile& rMetaFile);
+
Gradient& operator=( const Gradient& rGradient );
Gradient& operator=( Gradient&& rGradient );
bool operator==( const Gradient& rGradient ) const;
bool operator!=( const Gradient& rGradient ) const
{ return !(Gradient::operator==( rGradient )); }
+
+private:
+ tools::Long GetMetafileSteps(tools::Rectangle const& rRect) const;
+
+ void DrawComplexGradientToMetafile(tools::Rectangle const& rRect, GDIMetaFile& rMetaFile) const;
+ void DrawLinearGradientToMetafile(tools::Rectangle const& rRect, GDIMetaFile& rMetaFile) const;
};
#endif // INCLUDED_VCL_GRADIENT_HXX
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 9c86567865ba..13c8c49064b7 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -795,11 +795,6 @@ public:
void DrawGradient( const tools::Rectangle& rRect, const Gradient& rGradient );
void DrawGradient( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient );
- void AddGradientActions(
- const tools::Rectangle& rRect,
- const Gradient& rGradient,
- GDIMetaFile& rMtf );
-
protected:
virtual bool UsePolyPolygonForComplexGradient() = 0;
@@ -810,13 +805,8 @@ private:
SAL_DLLPRIVATE void DrawLinearGradient( const tools::Rectangle& rRect, const Gradient& rGradient, const tools::PolyPolygon* pClipPolyPoly );
SAL_DLLPRIVATE void DrawComplexGradient( const tools::Rectangle& rRect, const Gradient& rGradient, const tools::PolyPolygon* pClipPolyPoly );
-
SAL_DLLPRIVATE void DrawGradientToMetafile( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient );
- SAL_DLLPRIVATE void DrawLinearGradientToMetafile( const tools::Rectangle& rRect, const Gradient& rGradient );
- SAL_DLLPRIVATE void DrawComplexGradientToMetafile( const tools::Rectangle& rRect, const Gradient& rGradient );
-
SAL_DLLPRIVATE tools::Long GetGradientSteps(Gradient const& rGradient, tools::Rectangle const& rRect);
-
SAL_DLLPRIVATE Color GetSingleColorGradientFill();
///@}