MCPcopy Create free account
hub / github.com/buggins/coolreader / ConvertCRColorsToAndroid

Function ConvertCRColorsToAndroid

android/jni/cr3java.cpp:180–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178}
179
180static void ConvertCRColorsToAndroid( lUInt8 * buf, int dx, int dy )
181{
182 int sz = dx * dy;
183 for ( lUInt8 * p = buf; --sz>=0; p+=4 ) {
184 // invert A
185 p[3] ^= 0xFF;
186 // swap R and B
187 lUInt8 c = p[0];
188 p[0] = p[2];
189 p[2] = c;
190 }
191}
192
193class LVColorDrawBufEx : public LVColorDrawBuf {
194public:

Callers 1

convertMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected