lineRgba function

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

Implementation

int lineRgba(Pointer<SdlRenderer> renderer, int x1, int y1, int x2, int y2,
    int r, int g, int b, int a) {
  /*
	* Draw
	*/
  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, y1, x2, y2);
  return result;
}