From 019eda55fcb9117aef44d64d140ad451db6c9fcc Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Thu, 29 Sep 2016 20:35:05 -0400 Subject: GRAPHICS: Added a PixelFormat bpp method --- graphics/pixelformat.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'graphics/pixelformat.h') diff --git a/graphics/pixelformat.h b/graphics/pixelformat.h index 9dd06241b7..7b966a8a15 100644 --- a/graphics/pixelformat.h +++ b/graphics/pixelformat.h @@ -215,6 +215,10 @@ struct PixelFormat { return (8 - aLoss); } + inline byte bpp() const { + return rBits() + gBits() + bBits() + aBits(); + } + //////////////////////////////////////////////////////////////////////// // Convenience functions for getting color components' maximum values // //////////////////////////////////////////////////////////////////////// -- cgit v1.2.3