summaryrefslogtreecommitdiff
path: root/include/drawinglayer
diff options
context:
space:
mode:
authorArmin Le Grand <armin.le.grand@me.com>2020-04-10 18:07:41 +0200
committerArmin Le Grand <Armin.Le.Grand@me.com>2020-04-10 20:37:52 +0200
commitae743c6fae4543282f8930dc78175cc510fabbb3 (patch)
treeeb44065aece45c9fd86b50df495c3746192fb0be /include/drawinglayer
parent25468bba15a149edc1e53a7518070c64d4c967e9 (diff)
Make BitmapPrimitive2D vcl-independent
as preparation to have drawinglayer module independent from vcl in the future Change-Id: Iaa01370f27b51cba5114a54f37d1ec73d0719918 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92048 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'include/drawinglayer')
-rw-r--r--include/drawinglayer/primitive2d/bitmapprimitive2d.hxx31
1 files changed, 23 insertions, 8 deletions
diff --git a/include/drawinglayer/primitive2d/bitmapprimitive2d.hxx b/include/drawinglayer/primitive2d/bitmapprimitive2d.hxx
index d35a2699b0af..4d84a02f8e06 100644
--- a/include/drawinglayer/primitive2d/bitmapprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/bitmapprimitive2d.hxx
@@ -23,23 +23,37 @@
#include <drawinglayer/drawinglayerdllapi.h>
#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
-#include <vcl/bitmapex.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
+namespace com
+{
+namespace sun
+{
+namespace star
+{
+namespace awt
+{
+class XBitmap;
+}
+}
+}
+}
+
namespace drawinglayer::primitive2d
{
/** BitmapPrimitive2D class
This class is the central primitive for Bitmap-based primitives.
- It provides RGBA-based bitmaps, currently using a BitmapEx from VCL.
- This may change in the future to any other, maybe more general base
- class providing 24bit RGBA.
+ To keep it independent of Bitmap implementations, use UNO API
+ XBitmap object as wrapper due to formally used class Bitmap being
+ vcl-dependent and requiring linking against it. Use VCLUnoHelper
+ to convert awt::XBitmap <-> Bitmap
*/
class DRAWINGLAYER_DLLPUBLIC BitmapPrimitive2D final : public BasePrimitive2D
{
private:
- /// the RGBA Bitmap-data
- BitmapEx maBitmapEx;
+ /// the Bitmap-data
+ css::uno::Reference<css::awt::XBitmap> maXBitmap;
/** the object transformation from unit coordinates, defining
size, shear, rotate and position
@@ -48,10 +62,11 @@ private:
public:
/// constructor
- BitmapPrimitive2D(const BitmapEx& rBitmapEx, const basegfx::B2DHomMatrix& rTransform);
+ BitmapPrimitive2D(const css::uno::Reference<css::awt::XBitmap>& rXBitmap,
+ const basegfx::B2DHomMatrix& rTransform);
/// data read access
- const BitmapEx& getBitmapEx() const { return maBitmapEx; }
+ const css::uno::Reference<css::awt::XBitmap>& getXBitmap() const { return maXBitmap; }
const basegfx::B2DHomMatrix& getTransform() const { return maTransform; }
/// compare operator