MCPcopy Create free account
hub / github.com/cinder/Cinder / getDataRed

Function getDataRed

include/cinder/Surface.h:189–189  ·  view source on GitHub ↗

Returns a pointer to the red channel data of the pixel located at \a offset. Result is a uint8_t* for Surface8u and a float* for Surface32f.

Source from the content-addressed store, hash-verified

187 const T* getData( const ivec2 &offset ) const { return reinterpret_cast<T*>( reinterpret_cast<unsigned char*>( mData + offset.x * getPixelInc() ) + offset.y * mRowBytes ); }
188 //! Returns a pointer to the red channel data of the pixel located at \a offset. Result is a uint8_t* for Surface8u and a float* for Surface32f.
189 T* getDataRed( const ivec2 &offset ) { return getData( offset ) + getRedOffset(); }
190 const T* getDataRed( const ivec2 &offset ) const { return getData( offset ) + getRedOffset(); }
191 //! Returns a pointer to the green channel data of the pixel located at \a offset. Result is a uint8_t* for Surface8u and a float* for Surface32f.
192 T* getDataGreen( const ivec2 &offset ) { return getData( offset ) + getGreenOffset(); }

Callers

nothing calls this directly

Calls 2

getRedOffsetFunction · 0.85
getDataFunction · 0.70

Tested by

no test coverage detected