nSurface::nSurface( const c8 *name, E_COLOR_FORMAT ecfType, const Core::IDimension<u32> &dim, void *Data ) { if (name) { m_cName = new c8[strlen(name)+1]; memcpy(m_cName, name, strlen(name)+1); } SetupSurface( ecfType, dim, Data ); };
nsresult SharedDIBWin::Attach(Handle aHandle, uint32_t aWidth, uint32_t aHeight, bool aTransparent) { Close(); BITMAPV4HEADER bmih; SetupBitmapHeader(aWidth, aHeight, aTransparent, &bmih); nsresult rv = SharedDIB::Attach(aHandle, 0); if (NS_FAILED(rv)) return rv; if (NS_FAILED(SetupSurface(NULL, &bmih))) { Close(); return NS_ERROR_FAILURE; } return NS_OK; }
nsresult SharedDIBWin::Create(HDC aHdc, uint32_t aWidth, uint32_t aHeight, bool aTransparent) { Close(); // create the offscreen shared dib BITMAPV4HEADER bmih; uint32_t size = SetupBitmapHeader(aWidth, aHeight, aTransparent, &bmih); nsresult rv = SharedDIB::Create(size); if (NS_FAILED(rv)) return rv; if (NS_FAILED(SetupSurface(aHdc, &bmih))) { Close(); return NS_ERROR_FAILURE; } return NS_OK; }
sqInt sqQuicktimeInitialize() { SetupSurface(); return true; }
nSurface::nSurface( E_COLOR_FORMAT ecfType, const Core::IDimension<u32> &dim, void *Data ): m_cName(0) { SetupSurface( ecfType, dim, Data ); }