MCPcopy Create free account
hub / github.com/axmolengine/axmol / pngWriteCallback

Function pngWriteCallback

core/platform/Image.cpp:461–472  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

459
460#if AX_USE_PNG && !AX_USE_WIC
461void pngWriteCallback(png_structp png_ptr, png_bytep data, size_t length)
462{
463 if (png_ptr == NULL)
464 return;
465
466 auto fileStream = (IFileStream*)png_get_io_ptr(png_ptr);
467
468 const auto check = fileStream->write(data, static_cast<unsigned int>(length));
469
470 if (check != length)
471 png_error(png_ptr, "Write Error");
472}
473
474static void pngReadCallback(png_structp png_ptr, png_bytep data, png_size_t length)
475{

Callers

nothing calls this directly

Calls 2

png_get_io_ptrFunction · 0.85
writeMethod · 0.45

Tested by

no test coverage detected