MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / getChanelValueAt

Method getChanelValueAt

Engine/source/gfx/bitmap/gBitmap.cpp:868–882  ·  view source on GitHub ↗

--------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

866
867//--------------------------------------------------------------------------
868U8 GBitmap::getChanelValueAt(U32 x, U32 y, U32 chan)
869{
870 ColorI pixelColor = ColorI(255,255,255,255);
871 getColor(x, y, pixelColor);
872 if (mInternalFormat == GFXFormatL16)
873 {
874 chan = 0;
875 }
876 switch (chan) {
877 case 0: return pixelColor.red;
878 case 1: return pixelColor.green;
879 case 2: return pixelColor.blue;
880 default: return pixelColor.alpha;
881 }
882}
883
884//-----------------------------------------------------------------------------
885

Callers 1

Calls 1

ColorIClass · 0.70

Tested by

no test coverage detected