[Libreoffice-commits] core.git: include/vcl
LuboÅ¡ LuÅák (via logerrit)
logerrit at kemper.freedesktop.org
Mon May 3 10:37:44 UTC 2021
include/vcl/BitmapReadAccess.hxx | 9 +++++++++
1 file changed, 9 insertions(+)
New commits:
commit 90224afea1b1e51fb5a27cbbc9249b8ac7026abe
Author: Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Wed Apr 21 19:46:13 2021 +0200
Commit: Luboš Luňák <l.lunak at collabora.com>
CommitDate: Mon May 3 12:37:07 2021 +0200
const Point& overloads for some BitmapReadAccess functions
Change-Id: Ic33a42d94c1e3cd1022e4d4cda710eeade08e479
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115029
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak at collabora.com>
diff --git a/include/vcl/BitmapReadAccess.hxx b/include/vcl/BitmapReadAccess.hxx
index b68332e89294..2659a9960a51 100644
--- a/include/vcl/BitmapReadAccess.hxx
+++ b/include/vcl/BitmapReadAccess.hxx
@@ -83,6 +83,8 @@ public:
return mFncGetPixel(GetScanline(nY), nX, maColorMask);
}
+ BitmapColor GetPixel(const Point& point) const { return GetPixel(point.Y(), point.X()); }
+
BitmapColor GetColor(tools::Long nY, tools::Long nX) const
{
if (HasPalette())
@@ -91,11 +93,18 @@ public:
return GetPixel(nY, nX);
}
+ BitmapColor GetColor(const Point& point) const { return GetColor(point.Y(), point.X()); }
+
sal_uInt8 GetPixelIndex(tools::Long nY, tools::Long nX) const
{
return GetPixel(nY, nX).GetIndex();
}
+ sal_uInt8 GetPixelIndex(const Point& point) const
+ {
+ return GetPixelIndex(point.Y(), point.X());
+ }
+
/** Get the interpolated color at coordinates fY, fX; if outside, return rFallback */
BitmapColor GetInterpolatedColorWithFallback(double fY, double fX,
const BitmapColor& rFallback) const;
More information about the Libreoffice-commits
mailing list