hlineRgba function

int hlineRgba(
  1. Pointer<SdlRenderer> renderer,
  2. int x1,
  3. int x2,
  4. int y,
  5. int r,
  6. int g,
  7. int b,
  8. int a,
)

Implementation

int hlineRgba(Pointer<SdlRenderer> renderer, int x1, int x2, int y, int r,
    int g, int b, int a) {
  int result = 0;
  result |= sdlSetRenderDrawBlendMode(
      renderer, (a == 255) ? SDL_BLENDMODE_NONE : SDL_BLENDMODE_BLEND);
  result |= sdlSetRenderDrawColor(renderer, r, g, b, a);
  result |= sdlRenderDrawLine(renderer, x1, y, x2, y);
  return result;
}