pixelRgba function

bool pixelRgba(
  1. Pointer<SdlRenderer> renderer,
  2. double x,
  3. double y,
  4. int r,
  5. int g,
  6. int b,
  7. int a,
)

Implementation

bool pixelRgba(Pointer<SdlRenderer> renderer, double x, double y, int r, int g,
    int b, int a) {
  bool result = true;
  if (result) {
    result = sdlSetRenderDrawBlendMode(
        renderer, (a == 255) ? SDL_BLENDMODE_NONE : SDL_BLENDMODE_BLEND);
  }
  if (result) {
    result = sdlSetRenderDrawColor(renderer, r, g, b, a);
  }
  if (result) {
    result = sdlRenderPoint(renderer, x, y);
  }
  return result;
}