From cf4086ae26d2d90e6840d81fb368489bcc7a17b8 Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Wed, 17 Nov 2021 21:37:41 -0800 Subject: [PATCH] Add GetPixelIndex() to VisBitmap8 --- PluginCommon/VisBitmap8.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PluginCommon/VisBitmap8.cs b/PluginCommon/VisBitmap8.cs index ca738ef..61afd4d 100644 --- a/PluginCommon/VisBitmap8.cs +++ b/PluginCommon/VisBitmap8.cs @@ -55,13 +55,15 @@ namespace PluginCommon { mNextColorIdx = 0; } - // TODO: add GetPixelIndex, which returns the index we passed into SetPixelIndex - public int GetPixel(int x, int y) { byte pix = mData[x + y * Width]; return mPalette[pix]; } + public byte GetPixelIndex(int x, int y) { + return mData[x + y * Width]; + } + /// /// Sets the color for a single pixel. ///