MCPcopy Create free account
hub / github.com/DISTRHO/DPF / getBytesPerPixel

Function getBytesPerPixel

dgl/src/Cairo.cpp:664–677  ·  view source on GitHub ↗

Get the pixel size in bytes. @return pixel size, or 0 if the format is unknown, or pixels are not aligned to bytes. */

Source from the content-addressed store, hash-verified

662 @return pixel size, or 0 if the format is unknown, or pixels are not aligned to bytes.
663*/
664static int getBytesPerPixel(const cairo_format_t format) noexcept
665{
666 switch (format)
667 {
668 case CAIRO_FORMAT_ARGB32:
669 case CAIRO_FORMAT_RGB24:
670 return 4;
671 case CAIRO_FORMAT_A8:
672 return 1;
673 default:
674 DISTRHO_SAFE_ASSERT(false);
675 return 0;
676 }
677}
678
679static cairo_surface_t* getRegion(cairo_surface_t* origsurface, int x, int y, int width, int height) noexcept
680{

Callers 1

getRegionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected