summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.com>2014-05-31 21:03:34 +0200
committerTomaž Vajngerl <tomaz.vajngerl@collabora.com>2014-06-03 12:03:25 +0200
commit1b23e46051d8cc7c01fd8b4d0ea51bfec145db8e (patch)
tree5f441067b23404f6e98a8c70d7a538498192e04e /include
parent9a605b971a08965e9925eeff8762e333b7a31d43 (diff)
vcl: Refactor scale "super" out of bitmap and make it independent
Introduce BitmapFilter as a general bitmap filtering class, and make scale "super" algorithem independent as BitmapScaleSuper which uses BitmapFilter as superclass. This is an ongoing work to make some bitmap algorithms structured and more independent from the big bitmap class This will make them easier to work with, test and optimize. Change-Id: I37d29709b2af95cab2f6da21129302f5be79318b
Diffstat (limited to 'include')
-rw-r--r--include/vcl/bitmapfilter.hxx26
-rw-r--r--include/vcl/bitmapscalesuper.hxx38
2 files changed, 64 insertions, 0 deletions
diff --git a/include/vcl/bitmapfilter.hxx b/include/vcl/bitmapfilter.hxx
new file mode 100644
index 000000000000..37cdac1638d7
--- /dev/null
+++ b/include/vcl/bitmapfilter.hxx
@@ -0,0 +1,26 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#ifndef INCLUDED_VCL_BITMAPFILTER_HXX
+#define INCLUDED_VCL_BITMAPFILTER_HXX
+
+#include <vcl/bitmap.hxx>
+
+class VCL_DLLPUBLIC BitmapFilter
+{
+public:
+ BitmapFilter();
+ virtual ~BitmapFilter();
+ virtual bool filter(Bitmap& rBitmap) = 0;
+};
+
+#endif // INCLUDED_VCL_BITMAPFILTER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/bitmapscalesuper.hxx b/include/vcl/bitmapscalesuper.hxx
new file mode 100644
index 000000000000..3b59b9910ee1
--- /dev/null
+++ b/include/vcl/bitmapscalesuper.hxx
@@ -0,0 +1,38 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <vcl/bitmapfilter.hxx>
+
+#ifndef INCLUDED_VCL_BITMAPSCALESUPER_HXX
+#define INCLUDED_VCL_BITMAPSCALESUPER_HXX
+
+class VCL_DLLPUBLIC BitmapScaleSuper : public BitmapFilter
+{
+ double mrScaleX;
+ double mrScaleY;
+
+public:
+ BitmapScaleSuper(const double& rScaleX, const double& rScaleY);
+ virtual ~BitmapScaleSuper();
+ virtual bool filter(Bitmap& rBitmap) SAL_OVERRIDE;
+};
+
+#endif // INCLUDED_VCL_BITMAPSCALESUPER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */