summaryrefslogtreecommitdiff
path: root/include/vcl/BitmapTools.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-08-21 16:07:55 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-21 21:06:24 +0200
commitcd8dd48bf89d800c012afb04b16281ed8b261de9 (patch)
treece1ed337daefe46b0fd4f1e0f54dac629343b85d /include/vcl/BitmapTools.hxx
parentf05f4e042ca6ac8ae7f1d1e8e6bfb4cbba17a044 (diff)
tdf#119282 Area tab, Pattern color change
regression from commit ccd316d1cb310734848bd20244f509024b549b8c use VirtualDevice in createHistorical8x8FromArray Move the code inside vcl so we don't need to expose BitmapWriteAccess. I tried to detect this thing by counting the number of independent colors in the bitmap, but that didn't work. It is used from more than one place, and appears to be very determined that it needs a 2-color palette to work properly. Change-Id: Id11dd9ea78e5e522a6083d6a799e801cac81fd5b Reviewed-on: https://gerrit.libreoffice.org/59331 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'include/vcl/BitmapTools.hxx')
-rw-r--r--include/vcl/BitmapTools.hxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/vcl/BitmapTools.hxx b/include/vcl/BitmapTools.hxx
index 2064cb2d01dc..75eb6ed53077 100644
--- a/include/vcl/BitmapTools.hxx
+++ b/include/vcl/BitmapTools.hxx
@@ -23,6 +23,7 @@
#include <basegfx/range/b2drectangle.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <o3tl/safeint.hxx>
+#include <array>
namespace vcl {
namespace bitmap {
@@ -113,6 +114,11 @@ VCL_DLLPUBLIC void CanvasCairoExtractBitmapData( BitmapEx const & rBmpEx, Bitmap
VCL_DLLPUBLIC css::uno::Sequence< sal_Int8 > CanvasExtractBitmapData(BitmapEx const & rBitmapEx, const css::geometry::IntegerRectangle2D& rect);
+// helper to construct historical 8x8 bitmaps with two colors
+
+BitmapEx VCL_DLLPUBLIC createHistorical8x8FromArray(std::array<sal_uInt8,64> const & pArray, Color aColorPix, Color aColorBack);
+bool VCL_DLLPUBLIC isHistorical8x8(const BitmapEx& rBitmapEx, BitmapColor& o_rBack, BitmapColor& o_rFront);
+
}} // end vcl::bitmap
#endif // INCLUDED_VCL_BITMAP_TOOLS_HXX