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

Method SurfaceImage

blocks/Cairo/src/Cairo.cpp:178–189  ·  view source on GitHub ↗

//////////////////////////////////////////////////////////////////////// SurfaceImage

Source from the content-addressed store, hash-verified

176/////////////////////////////////////////////////////////////////////////////
177// SurfaceImage
178SurfaceImage::SurfaceImage( int32_t width, int32_t height, bool hasAlpha )
179 : SurfaceBase( width, height )
180{
181 if( hasAlpha ) {
182 mCairoSurface = cairo_image_surface_create( CAIRO_FORMAT_ARGB32, width, height );
183 }
184 else {
185 mCairoSurface = cairo_image_surface_create( CAIRO_FORMAT_RGB24, width, height );
186 }
187
188 initCinderSurface( hasAlpha, mCairoSurface );
189}
190
191SurfaceImage::SurfaceImage( const uint8_t *dataPtr, int32_t width, int32_t height, int32_t stride, bool hasAlpha )
192 : SurfaceBase( width, height )

Callers

nothing calls this directly

Calls 9

writeImageFunction · 0.85
getWidthMethod · 0.45
getHeightMethod · 0.45
hasAlphaMethod · 0.45
getChannelOrderMethod · 0.45
getRowBytesMethod · 0.45
getDataMethod · 0.45
copyFromMethod · 0.45
getBoundsMethod · 0.45

Tested by

no test coverage detected