vlineRgba function

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

Implementation

bool vlineRgba(Pointer<SdlRenderer> renderer, double x, double y1, double y2,
    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 = sdlRenderLine(renderer, x, y1, x, y2);
  }
  return result;
}