MCPcopy Create free account
hub / github.com/bbc/audiowaveform / createColor

Method createColor

src/GdImageRenderer.cpp:246–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244//------------------------------------------------------------------------------
245
246int GdImageRenderer::createColor(const RGBA& color) const
247{
248 if (color.hasAlpha()) {
249 return gdImageColorAllocateAlpha(image_, color.red, color.green, color.blue, 127 - (color.alpha / 2));
250 }
251 else {
252 return gdImageColorAllocate(image_, color.red, color.green, color.blue);
253 }
254}
255
256//------------------------------------------------------------------------------
257

Callers

nothing calls this directly

Calls 1

hasAlphaMethod · 0.45

Tested by

no test coverage detected